dissn8 icon indicating copy to clipboard operation
dissn8 copied to clipboard

Deferred label resolving only works for JMP/CALL

Open ranma opened this issue 3 years ago • 1 comments

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

ranma avatar Dec 20 '21 21:12 ranma