mirror of
https://github.com/catseye/SixtyPical.git
synced 2024-11-25 23:49:17 +00:00
75 lines
985 B
Plaintext
75 lines
985 B
Plaintext
// Should print ENGGL
|
|
|
|
byte b
|
|
|
|
define chrout routine
|
|
inputs a
|
|
trashes a
|
|
@ 65490
|
|
|
|
define main routine
|
|
outputs b
|
|
trashes a, x, y, z, n, c, v
|
|
{
|
|
ld a, 40
|
|
st a, b
|
|
|
|
cmp a, b
|
|
if z {
|
|
ld a, 69 // E
|
|
call chrout
|
|
} else {
|
|
ld a, 78 // N
|
|
call chrout
|
|
}
|
|
|
|
ld a, 41
|
|
st a, b
|
|
ld a, 40
|
|
|
|
cmp a, b
|
|
if z {
|
|
ld a, 69 // E
|
|
call chrout
|
|
} else {
|
|
ld a, 78 // N
|
|
call chrout
|
|
}
|
|
|
|
ld a, 20
|
|
st a, b
|
|
|
|
ld a, 21
|
|
|
|
cmp a, b // 21 >= 20
|
|
if c {
|
|
ld a, 71 // G
|
|
call chrout
|
|
} else {
|
|
ld a, 76 // L
|
|
call chrout
|
|
}
|
|
|
|
ld a, 20
|
|
|
|
cmp a, b // 20 >= 21
|
|
if c {
|
|
ld a, 71 // G
|
|
call chrout
|
|
} else {
|
|
ld a, 76 // L
|
|
call chrout
|
|
}
|
|
|
|
ld a, 19
|
|
|
|
cmp a, b // 19 < 21
|
|
if c {
|
|
ld a, 71 // G
|
|
call chrout
|
|
} else {
|
|
ld a, 76 // L
|
|
call chrout
|
|
}
|
|
}
|