Question

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 FOR J = 0 TO X
50 A$(I, J) = "."
60 NEXT
70 NEXT
80 PRINT A$
END

Can anyone help me out with it because when I paste it into the emulator, type END, and press enter literally nothing happens?

Any help is much appreciated. I'm trying to build a word search game.

Was it helpful?

Solution

Just for laughs, here is some code that does what I think you want to do:

C64 screen shot

Just type RUN and hit enter!

OTHER TIPS

Snip to fill an array with dots and print it:

10 INPUT "Please enter a number:", X
20 DIM A$(X, X)
21 REM make the array
30 FOR I = 0 TO X
    40 FOR J = 0 TO X
        50 A$(I, J) = "."
    60 NEXT
70 NEXT
80 REM print the array
90 FOR I = 0 TO X
    91 FOR J = 0 TO X
        92 PRINT A$(I, J);
    93 NEXT
    94 PRINT
95 NEXT
99 END
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top