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

34 lines
507 B
Plaintext
Raw Normal View History

// Should print Y
include "chrout.60p"
byte table[2048] buf
pointer ptr @ 254
byte foo
2018-09-09 14:03:43 +00:00
define main routine
inputs buf
outputs buf, y, foo
trashes a, z, n, c, ptr
{
ld y, 0
point ptr into buf {
reset ptr 0
copy 123, [ptr] + y
copy [ptr] + y, foo
copy foo, [ptr] + y
}
// TODO: support saying `cmp foo, 123`, maybe
ld a, foo
cmp a, 123
if z {
ld a, 89
call chrout
} else {
ld a, 78
call chrout
}
}