2018-12-12 09:13:13 +00:00
|
|
|
// Should print YY
|
|
|
|
|
2019-10-22 14:10:55 +00:00
|
|
|
include "chrout.60p"
|
|
|
|
|
2017-12-08 15:53:18 +00:00
|
|
|
word one
|
2018-03-06 12:23:57 +00:00
|
|
|
word table[256] many
|
2017-12-08 15:53:18 +00:00
|
|
|
|
2018-09-07 22:00:29 +00:00
|
|
|
define main routine
|
2017-12-08 15:53:18 +00:00
|
|
|
inputs one, many
|
|
|
|
outputs one, many
|
2018-12-12 09:13:13 +00:00
|
|
|
trashes a, x, y, c, n, z
|
2017-12-08 15:53:18 +00:00
|
|
|
{
|
|
|
|
ld x, 0
|
2018-12-12 09:13:13 +00:00
|
|
|
ld y, 1
|
2017-12-08 15:53:18 +00:00
|
|
|
copy 777, one
|
|
|
|
copy one, many + x
|
2018-12-12 09:13:13 +00:00
|
|
|
copy 888, one
|
2017-12-11 12:02:48 +00:00
|
|
|
copy one, many + y
|
2018-12-12 09:13:13 +00:00
|
|
|
|
|
|
|
ld x, 1
|
|
|
|
ld y, 0
|
|
|
|
|
2017-12-11 12:02:48 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2017-12-11 12:02:48 +00:00
|
|
|
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
|
|
|
|
}
|
2017-12-08 15:53:18 +00:00
|
|
|
}
|