Open jnowaczek opened 2 years ago
Having thought about this problem a bit over the last 10 months, it seems like straying from the behavior of existing assemblers would probably cause headaches. For all I know there were programmers that leveraged the ability to redefine any symbol just to make reading their code hard but there's no reason it's not valid assembler input.
Some programs, like STPWCH, redefine instruction symbols. My best guess is this was to permit assembling these programs in older assemblers that did not have these instructions in their default symbol tables, but it causes problems for the current implementation:
I can think of two approaches to solving this problem:
empty
As I understand things, the first option is closer to the way LAP6-DIAL and PAL-8 work. However, I am not sure how the
LMODE
andPMODE
pseudo-ops would interact with this... it seems like I would still need to keep track of which symbols were defined by the user and which were predefined. The second option seems more attractive, it would just require looking up instructions in the user symbol table before the predefined table.