mirror of
https://github.com/catseye/SixtyPical.git
synced 2026-04-27 02:18:14 +00:00
Final (for now) cleanup of the example sources.
This commit is contained in:
1 parent
75449d7271
commit
f2570729a4
7 files changed
+58
-28
No files matched your search
@@ -1,8 +0,0 @@
|
||||
define main routine
|
||||
inputs a
|
||||
outputs a
|
||||
trashes c, z, n, v
|
||||
{
|
||||
st off, c
|
||||
add a, 4
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
word score
|
||||
define main routine
|
||||
inputs score
|
||||
outputs score
|
||||
trashes a, c, z, v, n
|
||||
{
|
||||
st off, c
|
||||
add score, 1999
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
// Include `support/${PLATFORM}.60p` before this source
|
||||
// Should print YY
|
||||
|
||||
word score
|
||||
|
||||
define main routine
|
||||
inputs a, score
|
||||
outputs score
|
||||
trashes a, c, z, n, v
|
||||
{
|
||||
ld a, 3
|
||||
st off, c
|
||||
add a, 4
|
||||
|
||||
cmp a, 7
|
||||
if z {
|
||||
ld a, 89
|
||||
call chrout
|
||||
} else {
|
||||
ld a, 78
|
||||
call chrout
|
||||
}
|
||||
|
||||
copy 999, score
|
||||
st off, c
|
||||
add score, 1999
|
||||
|
||||
cmp score, 2998
|
||||
if z {
|
||||
ld a, 89
|
||||
call chrout
|
||||
} else {
|
||||
ld a, 78
|
||||
call chrout
|
||||
}
|
||||
}
|
||||
+16
-1
@@ -1,3 +1,6 @@
|
||||
// Include `support/${PLATFORM}.60p` before this source
|
||||
// Should print Y
|
||||
|
||||
buffer[2048] buf
|
||||
pointer ptr @ 254
|
||||
byte foo
|
||||
@@ -5,11 +8,23 @@ byte foo
|
||||
define main routine
|
||||
inputs buf
|
||||
outputs buf, y, foo
|
||||
trashes a, z, n, ptr
|
||||
trashes a, z, n, c, ptr
|
||||
{
|
||||
ld y, 0
|
||||
copy ^buf, ptr
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
byte bar
|
||||
byte baz
|
||||
|
||||
define main routine
|
||||
inputs baz
|
||||
outputs bar
|
||||
trashes a, n, z
|
||||
{
|
||||
copy baz, bar
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
// Include `support/${PLATFORM}.60p` before this source
|
||||
// Should print 01
|
||||
|
||||
byte lives
|
||||
|
||||
byte table[16] hexchars : "0123456789ABCDEF"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// This program is expected to loop forever.
|
||||
// Be prepared to forcibly terminate your emulator.
|
||||
|
||||
define main routine
|
||||
trashes a, y, z, n, c
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user