Code: Select all
macro repeat times, {code}
stx times
- txa
pha
{code}
pla
tax
dex
bne -
endm
repeat 10
{
... code, 'n stuff ...
}
ideally multiple virtual macros could be passed. i'm just using the braces as an idea for syntax but they could be dropped in the macros definition probably. for the macro call, perhaps make a comma or newline before { acceptable?
Code: Select all
macro FOR {init}, {test}, {incr}, {loopcode}
...
endm
FOR { ... } , { ... }, { ... }
{ ... }