1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-11-22 01:32:13 +00:00

Fairly minimal example that exhibits the problem.

This commit is contained in:
Chris Pressey 2018-02-07 13:43:41 +00:00
parent 6c1c1cb153
commit 1ee60095db
2 changed files with 55 additions and 2 deletions

53
eg/vector-table.60p Normal file
View 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
}

View File

@ -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