Example:
ldy #.sizeof(foo) ; fails
ldy #sizeof_foo ; workaround
.proc foo
.byte 0
.byte 1
.endproc
sizeof_foo := * - foo
There's the "you shouldn't do that!" argument, but I'm disassembling existing code and can't alter the order. The workaround is to define a label just after the proc and do math instead.
Example:
There's the "you shouldn't do that!" argument, but I'm disassembling existing code and can't alter the order. The workaround is to define a label just after the proc and do math instead.