dissn8
dissn8 copied to clipboard
Deferred label resolving only works for JMP/CALL
For JUMP and CALL instructions, any unresolved label is remembered in label_referer_dict and later fixed up at the end.
However this would also be useful to have working for immediate args referring to labels, e.g. this fails:
B0MOV Y, #myromdata$M
B0MOV Z, #myromdata$L
myromdata DW 0x1234
with error:
Traceback (most recent call last):
[...]
File "[...]dissn8/sn8/assn8.py", line 423, in p_identifier
raise NameError(production[1])
NameError: myromdata
Unless the data is already know when then MOV op is assembled, then it works:
myromdata DW 0x1234
B0MOV Y, #myromdata$M
B0MOV Z, #myromdata$L