git @ Cat's Eye Technologies SixtyPical / 2d767e9
Add example program that suggests we've got the arguments backwards. Chris Pressey 3 years ago
1 changed file(s) with 74 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 // Should print ENLGG
1
2 word w1
3 word w2
4
5 define chrout routine
6 inputs a
7 trashes a
8 @ 65490
9
10 define main routine
11 outputs w1, w2
12 trashes a, x, y, z, n, c, v
13 {
14 copy 4000, w1
15 copy 4000, w2
16
17 cmp w1, w2
18 if z {
19 ld a, 69 // E
20 call chrout
21 } else {
22 ld a, 78 // N
23 call chrout
24 }
25
26 copy 4000, w1
27 copy 4001, w2
28
29 cmp w1, w2
30 if z {
31 ld a, 69 // E
32 call chrout
33 } else {
34 ld a, 78 // N
35 call chrout
36 }
37
38 copy 20000, w1
39 copy 20001, w2
40
41 cmp w1, w2
42 if c {
43 ld a, 71 // G
44 call chrout
45 } else {
46 ld a, 76 // L
47 call chrout
48 }
49
50 copy 20001, w1
51 copy 20001, w2
52
53 cmp w1, w2
54 if c {
55 ld a, 71 // G
56 call chrout
57 } else {
58 ld a, 76 // L
59 call chrout
60 }
61
62 copy 20002, w1
63 copy 20001, w2
64
65 cmp w1, w2
66 if c {
67 ld a, 71 // G
68 call chrout
69 } else {
70 ld a, 76 // L
71 call chrout
72 }
73 }