diff options
Diffstat (limited to 'tests/delayed_macro_arguments.s')
| -rw-r--r-- | tests/delayed_macro_arguments.s | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/delayed_macro_arguments.s b/tests/delayed_macro_arguments.s new file mode 100644 index 0000000..b91ec92 --- /dev/null +++ b/tests/delayed_macro_arguments.s @@ -0,0 +1,49 @@ +.segment "HEADER" + .byte 'N', 'E', 'S', $1A + .byte $02 + .byte $01 + .byte $00 + .byte $00 + +.segment "CODE" + +.macro JAL ADDR + jmp ADDR +.endmacro + +.macro DEC_MOVEMENT_X ADDR + lda ADDR + rts +.endmacro + +.proc bounce + rts +.endproc + +.proc chase + JAL bounce +@wait: + DEC_MOVEMENT_X #1 + DEC_MOVEMENT_X #2 + JAL bounce + DEC_MOVEMENT_X #3 + JAL chase + bne @wait + rts +.endproc + +.macro NEXT_EXPLOSION_INDEX_X + inx + inx + inx +.endmacro + +.scope Explosions + .proc init + @loop: + NEXT_EXPLOSION_INDEX_X + bne @loop + + rts + .endproc +.endscope |
