All Questions
18
questions
0
votes
1
answer
80
views
Why is there an unexpected character on line 6 in C64 Basic?
PRG Studio says there is an unexpected character on line 6. But, I can't figure out why. I'm programming for the c64.
1 rem setup
3 holding = "nothing"
6 playing_game = true
10 rem intro
20 ...
3
votes
1
answer
158
views
I'm currently trying to learn commodore 64 BASIC and I'm getting an error with my sleep function
I've been recently learning commodore 64 BASIC and I'm trying to create a text adventure game, and I'm getting an error concerning all of the sleep functions I used. My code is:
20 SLEEP(1000)
30 ...
2
votes
1
answer
58
views
DEF FN(x) How does one transfer / translate "Define Function" command to VB.NET?
The 8bit code is:
...
90 DEF FNX(D)=INT(RND(0)*D*8-D*3)
100 DEF FNDS(D)=INT(SQR(ABS(P(D,0)-P(L,0))^2+ABS(P(D,1)-P(L,1)^2+ABS(P(D,2)-P(L,2))^2))
...
150 FOR I = 1 TO 9 :...
...
180 P(I,0)=FNX(I):P(I,1)=...
1
vote
3
answers
855
views
How to enter commands programmatically in c64's basic?
I want to write a very simple basic program in commodore 64 that enters other basic commands.
Here's an example:
10 print"list"+chr$(13)
This prints list but doesn't hit enter.
My ...
3
votes
3
answers
563
views
How to 'manipulate' strings in BASIC V2?
I would like to reach the following:
I ask for a number from the user, and then output a string like the following:
-STR$
--STR$
---STR$
----STR$
-----STR$
I tried to do this:
10 INPUT NUM%
20 FOR X=1 ...
1
vote
1
answer
69
views
Issues with MID$ function
I'm trying to print out every character of a given string on a new line.
1 INPUT ""; A$
2 E%=0
3 IF E% < LEN(A$) GOTO 5
4 END
5 PRINT MID$(A$,E%,E%+1)
6 E% = E% + 1
7 GOTO 3
I keep on ...
1
vote
0
answers
93
views
Can't enable list even with "enable run-stop" poke
Well, I've downloaded an old non-English textual adventure, which of course, "for the sake of professionalism" have list disabled. Even after entering pokes for enabling "run-stop/restore" and for ...
5
votes
2
answers
616
views
Generating random direction in C64 Basic
I have run the ‘More Bouncing Balls’ Basic program from chapter 5 of the C64 user’s manual, with the addition from the final page of the chapter. The code is as follows:
10 PRINT CHR$(147):REM SHIFT ...
0
votes
2
answers
295
views
Ex Commodore 64 programmer wants to get back into programming- any suggestions?
When I was a kid I wrote hundreds of programs in BASIC but then as I got older I got out of it (when I discovered girls). Now I want to get back into it again and I don't want to let my prior ...
4
votes
3
answers
519
views
Is it possible to store any PETSCII character in a DATA statement string in Commodore BASIC?
I would like to store some binary data in a BASIC program on the Commodore 64 as DATA statements. To save space, I'd prefer to store as a string, rather than as a sequence of numbers.
Is it possible ...
9
votes
3
answers
2k
views
Multi-line functions in Commodore 64 BASIC
So, I'd like to write larger functions in Commodore 64 BASIC. So far, from what I'm seeing from other sources (such as various C64 wikis, as well as the user's manual for the C64 itself,) function ...
1
vote
3
answers
698
views
Redim'd array error in commodore 64 basic?
I am getting a redim'd array error in my commodore 64 basic project
I am not however re dimensioning my 2d array nor do I go through the line of code more than once!
Error is on line 1140
Can ...
3
votes
1
answer
1k
views
How to separate a string in commodore 64 basic?
I have a board of "."s initialized into a board in commodore 64.
I want to randomly place words into the board with each letter of the word being a "." on the board (like a word search game). If the ...
1
vote
1
answer
78
views
Correct usage of subroutine in commodore basic 4.0?
I have a subroutine which fills an array with "."s
In my main program I am trying to call this subroutine and then print the array; however, it doesn't seem to be working. I think I am incorrectly ...
12
votes
3
answers
188
views
Printing a board in Commodore Basic 4.0?
I'm having trouble with printing a board of dots in Commodore Basic 6502.
This is what I have to far: (it's a subroutine)
10 INPUT "Please enter a number:", X
20 DIM A$(X, X)
30 FOR I = 0 TO X
40 ...