0 REM Random DOTs on a Line  RANDOTS.BAS.txt  LINES.BAS.txt

10 REM Random Dots with Shifting Rows in DZMBASIC
20 RANDOMIZE : REM Initialize random number generator
30 GOSUB 1000 : REM Clear the screen
40 REM FOR Y = 255 TO 0 STEP -1
50 GOSUB 3000
60 REM NEXT Y
99 GOSUB 9000

1000 REM Clear the screen
1010 DZOP "C",16 : REM Set color to black
1020 DZOP "P",0,0
1030 DZOP "R",255,255 : REM Clear the screen
1999 RETURN

3000 REM Draw a new random row of dots at the top
3005 FOR Y = 255 TO 0 STEP -2
3010 FOR X = 0 TO 255

3020   COLOR = INT(RND * 7) + 17 : REM Random color between 17 and 23
3030   DZOP "C", COLOR
3040   DZOP "P", X,Y : REM Set position at the top row (y=0)
3050   DZOP "D" : REM Plot the random dot
3060 NEXT X
3065 GOSUB 1000
3070 NEXT Y
3999 RETURN

9000 REM End Routine
9010 FOR G = 0 TO 1
9020 PRINT CHR$(7)
9030 FOR PAUSE = 0 TO 499 : NEXT PAUSE
9040 NEXT G
9990 END
