Open ncatelli opened 3 years ago
This will probably come with some preparser deref syntax. changes something like
.define byte test 0xff
.define word addr 0xaaaa
lda [test]
sta [addr]
Alternatively it might be better keeping with the style of the preparser and prefixing with a .
for consistency. Though this is slighly uglier
.define byte test 0xff
.define word addr 0xaaaa
lda .ref test
sta .ref addr
The preparser passes reference objects to each corresponding backend to be parsed. Instead, the preparser should replace each reference with a corresponding constant allowing the backends to handle sizing or offset correctness.
The only exception to this will be Origin offset blocks which will be the smallest block passed to the assembler.