aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2019-11-21 11:30:18 -0600
committerWilliam Harrington <kb0iic@berzerkula.org>2019-11-21 11:30:18 -0600
commit271dfffba272b1babb01b254be8bf95bbb97c2b7 (patch)
treeb762b4c406529a9ad7c84a3bbe6c720b0c0aba44
parent55af174ad12245ff85f5ffd94b869589ee96c390 (diff)
Add program with messages displayed when input buttons are pressed and then continue random display when switch 8 (bit 128) is pressed.
-rw-r--r--sc126/BASIC/MESSAGES.BAS50
1 files changed, 50 insertions, 0 deletions
diff --git a/sc126/BASIC/MESSAGES.BAS b/sc126/BASIC/MESSAGES.BAS
new file mode 100644
index 0000000..8d23d28
--- /dev/null
+++ b/sc126/BASIC/MESSAGES.BAS
@@ -0,0 +1,50 @@
+1 REM DISPLAY 4 RANDOM BYTE VALUES
+2 REM SCOTT BAKER FRONT PANEL BOARD
+3 REM AT PORT 0x20
+4 REM 00000000 TO FFFFFFFF
+10 RANDOMIZE SEED
+15 LET DELAY = INT(RND*10000)
+20 IR = INT(RND*256)
+21 HR = INT(RND*256)
+22 GR = INT(RND*256)
+23 FR = INT(RND*256)
+25 SEED = INT(RND*100)
+30 OUT 13, IR
+35 OUT &H23, FR
+36 OUT &H22, GR
+37 OUT &H21, HR
+38 OUT &H20, IR
+50 X = INP(&H24)
+51 IF (X AND 1) = 1 THEN GOSUB 1000
+52 IF (X AND 2) = 2 THEN GOSUB 1100
+53 IF (X AND 4) = 4 THEN GOSUB 1200
+54 IF (X AND 8) = 8 THEN GOSUB 1300
+55 IF (X AND 16) = 16 THEN GOSUB 1400
+56 IF (X AND 32) = 32 THEN GOSUB 1400
+57 IF (X AND 64) = 64 THEN GOSUB 1600
+58 IF (X AND 128) = 128 THEN PRINT "NO MESSAGE"
+100 FOR Z = 0 TO DELAY : NEXT Z
+200 GOTO 10
+1000 OUT &H20, &HFE : OUT &H21, &HED : OUT &H22, &HFA : OUT &H23, &HCE
+1010 GOSUB 2000
+1020 RETURN
+1100 OUT &H20, &HFA : OUT &H21, &HCE : OUT &H22, &HFE : OUT &H23, &HED
+1110 GOSUB 2000
+1120 RETURN
+1200 OUT &H20, &HDE : OUT &H21, &HAD : OUT &H22, &HBE : OUT &H23, &HEF
+1210 GOSUB 2000
+1220 RETURN
+1300 OUT &H20, &HBA : OUT &H21, &H5E : OUT &H22, &HBA : OUT &H23, &H11
+1310 GOSUB 2000
+1320 RETURN
+1400 OUT &H20, &HDE : OUT &H21, &HAD : OUT &H22, &HBE : OUT &H23, &HA7
+1410 GOSUB 2000
+1420 RETURN
+1500 OUT &H20, &HF0 : OUT &H21, &H5 : OUT &H22, &HBA : OUT &H23, &H11
+1510 GOSUB 2000
+1520 RETURN
+1600 OUT &H20, &HEA : OUT &H21, &H75 : OUT &H22, &HF0 : OUT &H23, &HD
+1610 GOSUB 2000
+1620 RETURN
+2000 WAIT &H24, 128
+2010 RETURN