diff options
Diffstat (limited to 'sc126/BASIC')
-rw-r--r-- | sc126/BASIC/COUNTUP2.BAS | 57 |
1 files changed, 35 insertions, 22 deletions
diff --git a/sc126/BASIC/COUNTUP2.BAS b/sc126/BASIC/COUNTUP2.BAS index 692e4f5..5d34117 100644 --- a/sc126/BASIC/COUNTUP2.BAS +++ b/sc126/BASIC/COUNTUP2.BAS @@ -1,38 +1,51 @@ -10 AR=INT(RND(1)*256) -11 BR=INT(RND(1)*256) -12 CR=INT(RND(1)*256) -13 DR=INT(RND(1)*256) -14 LR=INT(RND(1)*256) -20 DELAY=INT(RND(1)*1000) -30 OUT &H20,0:OUT &H21,0:OUT &H22,0:OUT &H23,0:OUT &HD,0 -40 GOSUB 100 -42 GOSUB 200 -44 GOSUB 300 -46 GOSUB 400 -48 GOSUB 500 -70 IF A = AR AND B = BR AND C = CR AND D = DR AND L = LR THEN GOTO 1010 -90 GOTO 40 +10 RANDOMIZE SEED +20 AR = INT(RND(1)*256) +21 BR = INT(RND(1)*256) +22 CR = INT(RND(1)*256) +23 DR = INT(RND(1)*256) +24 LR = INT(RND(1)*256) +25 MR = INT(RND(1)*256) +25 DELAY = INT(RND(1)*10000) +40 OUT &H20, 0 +41 OUT &H21, 0 +42 OUT &H22, 0 +43 OUT &H23, 0 +44 OUT &H0D, 0 +45 OUT &H00, 0 +50 GOSUB 100 +52 GOSUB 200 +54 GOSUB 300 +56 GOSUB 400 +58 GOSUB 500 +60 GOSUB 600 +70 IF A=AR AND B=BR AND C=CR AND D=DR AND L=LR AND M=MR THEN GOTO 1010 +90 GOTO 50 100 IF A = AR THEN RETURN -110 LET A = A+1 -120 OUT &H20,A +110 LET A = A + 1 +120 OUT &H20, A 130 RETURN 200 IF B = BR THEN RETURN -210 LET B = B+1 +210 LET B = B + 1 220 OUT &H21, B 230 RETURN 300 IF C = CR THEN RETURN -310 LET C = C+1 +310 LET C = C + 1 320 OUT &H22, C 330 RETURN 400 IF D = DR THEN RETURN -410 LET D = D+1 +410 LET D = D + 1 420 OUT &H23, D 430 RETURN 500 IF L = LR THEN RETURN -510 LET L = L+1 +510 LET L = L + 1 520 OUT &H0D, L 530 RETURN +600 IF M = MR THEN RETURN +610 LET M = M + 1 +620 OUT &H0, M +630 RETURN 1000 REM RANDOM DELAY LENGTH -1010 FOR Z = 0 TO DELAY: NEXT Z -1020 A = 0:B = 0:C = 0:D = 0:L = 0 +1010 FOR Z = 0 TO DELAY : NEXT Z +1020 A = 0 : B = 0 : C = 0 : D = 0 : L = 0 1030 GOTO 10 + |