git @ Cat's Eye Technologies SixtyPical / 03a682f
Make word-table print YY. Chris Pressey 2 years ago
1 changed file(s) with 27 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
0 // Include `support/${PLATFORM}.60p` before this source
1 // Should print YY
2
03 word one
14 word table[256] many
25
36 define main routine
47 inputs one, many
58 outputs one, many
6 trashes a, x, y, n, z
9 trashes a, x, y, c, n, z
710 {
811 ld x, 0
9 ld y, 0
12 ld y, 1
1013 copy 777, one
1114 copy one, many + x
15 copy 888, one
1216 copy one, many + y
17
18 ld x, 1
19 ld y, 0
20
1321 copy many + x, one
22 cmp one, 888
23 if z {
24 ld a, 89
25 call chrout
26 } else {
27 ld a, 78
28 call chrout
29 }
30
1431 copy many + y, one
32 cmp one, 777
33 if z {
34 ld a, 89
35 call chrout
36 } else {
37 ld a, 78
38 call chrout
39 }
1540 }