mirror of
https://github.com/catseye/SixtyPical.git
synced 2024-11-22 17:32:01 +00:00
Fairly minimal example that exhibits the problem.
This commit is contained in:
parent
6c1c1cb153
commit
1ee60095db
53
eg/vector-table.60p
Normal file
53
eg/vector-table.60p
Normal file
@ -0,0 +1,53 @@
|
||||
vector routine
|
||||
trashes a, z, n
|
||||
print
|
||||
|
||||
vector (routine
|
||||
trashes a, z, n)
|
||||
table[32] vectors
|
||||
|
||||
routine chrout
|
||||
inputs a
|
||||
trashes a
|
||||
@ 65490
|
||||
|
||||
routine printa
|
||||
trashes a, z, n
|
||||
{
|
||||
ld a, 65
|
||||
call chrout
|
||||
}
|
||||
|
||||
routine printb
|
||||
trashes a, z, n
|
||||
{
|
||||
ld a, 66
|
||||
call chrout
|
||||
}
|
||||
|
||||
routine main
|
||||
inputs vectors
|
||||
outputs vectors
|
||||
trashes print, a, x, z, n, c
|
||||
{
|
||||
ld x, 0
|
||||
copy printa, vectors + x
|
||||
inc x
|
||||
copy printa, vectors + x
|
||||
inc x
|
||||
copy printb, vectors + x
|
||||
inc x
|
||||
copy printa, vectors + x
|
||||
inc x
|
||||
copy printb, vectors + x
|
||||
|
||||
copy printa, print
|
||||
|
||||
ld x, 0
|
||||
repeat {
|
||||
copy vectors + x, print
|
||||
call print
|
||||
inc x
|
||||
cmp x, 5
|
||||
} until z
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
vector print
|
||||
vector routine
|
||||
trashes a, z, n
|
||||
print
|
||||
|
||||
routine chrout
|
||||
inputs a
|
||||
@ -21,7 +22,6 @@ routine printb
|
||||
}
|
||||
|
||||
routine main
|
||||
inputs printa, printb
|
||||
trashes print, a, z, n
|
||||
{
|
||||
copy printa, print
|
||||
|
Loading…
Reference in New Issue
Block a user