c64jasm
c64jasm copied to clipboard
Forward references to variables
A nice-to-have really. I use self-modifying code a lot, like in this contrived example:
!let color = loop + 1
lda #0
sta color
loop:
lda #0
sta $d020
inc color
jmp loop
I would prefer to write it like this:
lda #0
sta color
loop:
!let color = * + 1
lda #0
sta $d020
inc color
jmp loop
But that doesn't work because I am referencing color before it is defined.
But only if it doesn't cost much, the above is also workable.