1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-11-22 17:32:01 +00:00
SixtyPical/eg/rudiments/word-table.60p

42 lines
618 B
Plaintext
Raw Normal View History

2018-12-12 09:13:13 +00:00
// Include `support/${PLATFORM}.60p` before this source
// Should print YY
word one
word table[256] many
define main routine
inputs one, many
outputs one, many
2018-12-12 09:13:13 +00:00
trashes a, x, y, c, n, z
{
ld x, 0
2018-12-12 09:13:13 +00:00
ld y, 1
copy 777, one
copy one, many + x
2018-12-12 09:13:13 +00:00
copy 888, one
copy one, many + y
2018-12-12 09:13:13 +00:00
ld x, 1
ld y, 0
copy many + x, one
2018-12-12 09:13:13 +00:00
cmp one, 888
if z {
ld a, 89
call chrout
} else {
ld a, 78
call chrout
}
copy many + y, one
2018-12-12 09:13:13 +00:00
cmp one, 777
if z {
ld a, 89
call chrout
} else {
ld a, 78
call chrout
}
}