aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2022-05-19 21:23:11 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2022-05-19 21:23:11 -0500
commitcdff9aedb2077d63c433cbca2943b434179a9e55 (patch)
tree1cd5f42e8736b26c8283eb25c38bf250253d0ffc
parente17a183639d78ffd135a6651f03ca791a8e4b088 (diff)
Add support for 8 bit led board at 0&H00.
-rw-r--r--sc126/BASIC/COUNTUP.BAS36
1 files changed, 25 insertions, 11 deletions
diff --git a/sc126/BASIC/COUNTUP.BAS b/sc126/BASIC/COUNTUP.BAS
index 1a0710c..4e0c388 100644
--- a/sc126/BASIC/COUNTUP.BAS
+++ b/sc126/BASIC/COUNTUP.BAS
@@ -1,15 +1,25 @@
10 RANDOMIZE SEED
-20 AR = INT(RND*256) : BR = INT(RND*256) : CR = INT(RND*256) : DR = INT(RND*256)
- : LR = INT(RND*256)
-25 DELAY = INT(RND*10000)
-30 SEED = INT(RND*100)
-40 OUT &H20, 0 : OUT &H21, 0 : OUT &H22, 0 : OUT &H23, 0 : OUT &HD, 0
+20 AR = INT(RND*256)
+21 BR = INT(RND*256)
+22 CR = INT(RND*256)
+23 DR = INT(RND*256)
+24 LR = INT(RND*256)
+25 MR = INT(RND*256)
+30 DELAY = INT(RND*10000)
+31 SEED = INT(RND*100)
+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
-70 IF A = AR AND B = BR AND C = CR AND D = DR AND L = LR THEN GOTO 1010
+51 GOSUB 200
+52 GOSUB 300
+53 GOSUB 400
+54 GOSUB 500
+55 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
@@ -31,7 +41,11 @@
510 LET L = L + 1
520 OUT &H0D, L
530 RETURN
+600 IF M = MR THEN RETURN
+610 LET M = M + 1
+620 OUT &H00, 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
+1020 A = 0 : B = 0 : C = 0 : D = 0 : L = 0 : M = 0
1030 GOTO 10