mirror of
https://github.com/catseye/SixtyPical.git
synced 2025-02-16 15:30:26 +00:00
Fix my own confusion, and with it, the unit test.
This commit is contained in:
parent
0361016e4c
commit
cb2bda6afd
@ -1248,24 +1248,56 @@ Indirect goto.
|
|||||||
| }
|
| }
|
||||||
= ok
|
= ok
|
||||||
|
|
||||||
Jumping through the vector does indeed output the things the vector says it does.
|
Jumping through the vector does indeed trash, or output, the things the
|
||||||
|
vector says it does.
|
||||||
|
|
||||||
| vector foo trashes a, x, z, n
|
| vector foo
|
||||||
|
| trashes a, x, z, n
|
||||||
|
|
|
|
||||||
| routine bar trashes a, x, z, n {
|
| routine bar
|
||||||
|
| trashes a, x, z, n {
|
||||||
| ld x, 200
|
| ld x, 200
|
||||||
| }
|
| }
|
||||||
|
|
|
|
||||||
| routine sub inputs bar trashes foo, a, x, z, n {
|
| routine sub
|
||||||
|
| inputs bar
|
||||||
|
| trashes foo, a, x, z, n {
|
||||||
| ld x, 0
|
| ld x, 0
|
||||||
| copy bar, foo
|
| copy bar, foo
|
||||||
| goto foo
|
| goto foo
|
||||||
| }
|
| }
|
||||||
|
|
|
|
||||||
| routine main inputs bar outputs a trashes z, n {
|
| routine main inputs bar
|
||||||
|
| outputs a
|
||||||
|
| trashes foo, x, z, n {
|
||||||
| call sub
|
| call sub
|
||||||
| ld a, x
|
| ld a, x
|
||||||
| }
|
| }
|
||||||
? UnmeaningfulReadError: x in main
|
? UnmeaningfulReadError: x in main
|
||||||
|
|
||||||
Ack, I have become a bit confused...
|
| vector foo
|
||||||
|
| outputs x
|
||||||
|
| trashes a, z, n
|
||||||
|
|
|
||||||
|
| routine bar
|
||||||
|
| outputs x
|
||||||
|
| trashes a, z, n {
|
||||||
|
| ld x, 200
|
||||||
|
| }
|
||||||
|
|
|
||||||
|
| routine sub
|
||||||
|
| inputs bar
|
||||||
|
| outputs x
|
||||||
|
| trashes foo, a, z, n {
|
||||||
|
| ld x, 0
|
||||||
|
| copy bar, foo
|
||||||
|
| goto foo
|
||||||
|
| }
|
||||||
|
|
|
||||||
|
| routine main inputs bar
|
||||||
|
| outputs a
|
||||||
|
| trashes foo, x, z, n {
|
||||||
|
| call sub
|
||||||
|
| ld a, x
|
||||||
|
| }
|
||||||
|
= ok
|
||||||
|
Loading…
x
Reference in New Issue
Block a user