This program uses the 8K ROM’s graphics and animation capabilities to generate an ever-changing video pattern like a growing city. To use, type RUN (NL) and then enter a pause time (number of frames to display between movements). Good times are 7 and 10. The image may jump around a bit, but changing the pause time will help. To “fast forward,” hold down the P key. The computer will build the city but not display it until you release P.
The program defines two variables, X & Y, to indicate line & column of the current position. It selects a random direction (up, down, right, left) and changes the current position accordingly, displaying a character there. The display continues for Z frames then changes. The program runs until it fills memory or you hit BREAK.
2 RANDOMIZE
5 INPUT Z
10 LET X=12
15 LET Y=16
20 GO TO 31+40*RND
40 LET X=X+(X<>21)
41 LET C$="▄"
42 GO TO 100
50 LET Y=Y+(Y<>31)
51 LET C$="▐"
52 GO TO 100
60 LET X=X-(X<>0)
61 LET C$="▀"
62 GO TO 100
70 LET Y=Y-(Y<>0)
71 LET C$="▌"
100 PRINT AT X,Y;C$
103 IF INKEY$="P" THEN GO TO 20
105 PAUSE Z
110 GO TO 20
PRINT 17408-PEEK(16400)-PEEK(16401)*256 as the last line of your program will print the number of bytes still available.
Media
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.