chipty5/tests/call.ch8asm

22 lines
304 B
Plaintext

;
; Exercise JP/CALL/RET
;
LD V0, 9
CALL sub1
LD V2, 9
CALL sub2
LD V4, 9
JP skip
LD V4, 0
skip LD V5, 9
EXIT
sub1 LD V1, 1
RET
sub2 LD V3, 2
RET