2018-11-27 13:05:19 +00:00
|
|
|
// Should print ENGGL
|
2018-11-23 23:11:06 +00:00
|
|
|
|
2018-11-27 13:05:19 +00:00
|
|
|
byte b
|
2018-11-23 23:11:06 +00:00
|
|
|
|
|
|
|
define chrout routine
|
|
|
|
inputs a
|
|
|
|
trashes a
|
|
|
|
@ 65490
|
|
|
|
|
|
|
|
define main routine
|
2018-11-27 13:05:19 +00:00
|
|
|
outputs b
|
2018-11-23 23:11:06 +00:00
|
|
|
trashes a, x, y, z, n, c, v
|
|
|
|
{
|
2018-11-27 13:05:19 +00:00
|
|
|
ld a, 40
|
|
|
|
st a, b
|
2018-11-23 23:11:06 +00:00
|
|
|
|
2018-11-27 13:05:19 +00:00
|
|
|
cmp a, b
|
2018-11-23 23:11:06 +00:00
|
|
|
if z {
|
|
|
|
ld a, 69 // E
|
|
|
|
call chrout
|
|
|
|
} else {
|
|
|
|
ld a, 78 // N
|
|
|
|
call chrout
|
|
|
|
}
|
|
|
|
|
2018-11-27 13:05:19 +00:00
|
|
|
ld a, 41
|
|
|
|
st a, b
|
|
|
|
ld a, 40
|
2018-11-23 23:11:06 +00:00
|
|
|
|
2018-11-27 13:05:19 +00:00
|
|
|
cmp a, b
|
2018-11-23 23:11:06 +00:00
|
|
|
if z {
|
|
|
|
ld a, 69 // E
|
|
|
|
call chrout
|
|
|
|
} else {
|
|
|
|
ld a, 78 // N
|
|
|
|
call chrout
|
|
|
|
}
|
|
|
|
|
2018-11-27 13:05:19 +00:00
|
|
|
ld a, 20
|
|
|
|
st a, b
|
2018-11-23 23:11:06 +00:00
|
|
|
|
2018-11-27 13:05:19 +00:00
|
|
|
ld a, 21
|
|
|
|
|
|
|
|
cmp a, b // 21 >= 20
|
2018-11-23 23:11:06 +00:00
|
|
|
if c {
|
|
|
|
ld a, 71 // G
|
|
|
|
call chrout
|
|
|
|
} else {
|
|
|
|
ld a, 76 // L
|
|
|
|
call chrout
|
|
|
|
}
|
|
|
|
|
2018-11-27 13:05:19 +00:00
|
|
|
ld a, 20
|
2018-11-23 23:11:06 +00:00
|
|
|
|
2018-11-27 13:05:19 +00:00
|
|
|
cmp a, b // 20 >= 21
|
2018-11-23 23:11:06 +00:00
|
|
|
if c {
|
|
|
|
ld a, 71 // G
|
|
|
|
call chrout
|
|
|
|
} else {
|
|
|
|
ld a, 76 // L
|
|
|
|
call chrout
|
|
|
|
}
|
|
|
|
|
2018-11-27 13:05:19 +00:00
|
|
|
ld a, 19
|
2018-11-23 23:11:06 +00:00
|
|
|
|
2018-11-27 13:05:19 +00:00
|
|
|
cmp a, b // 19 < 21
|
2018-11-23 23:11:06 +00:00
|
|
|
if c {
|
|
|
|
ld a, 71 // G
|
|
|
|
call chrout
|
|
|
|
} else {
|
|
|
|
ld a, 76 // L
|
|
|
|
call chrout
|
|
|
|
}
|
|
|
|
}
|