aboutsummaryrefslogtreecommitdiffstats
path: root/sc126/BASIC/MESSAGES.BAS
blob: 4daeb1466114d4c72e4e1c79feaa2a8fbe29fbbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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 1500
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, &H07 : 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