Open andrew-davie opened 3 years ago
Yes, this is a "feature" of dasm. Macros and Instructions don't share the same "namespace". Therefore there will be no clash. The macro will be silently ignored because the processor mnemonic is matched earlier.
A fix would need to introduce some extra "cross-checking" and proper aborting. Dasm could not decide by itself what is better to choose (macro or processor mnemonic).
A solution to this problem could be to have another processor definition (subset, like with the 68705 and 68908) or to implement a special UNDEFINE keyword that kicks out a special mnemonic.
I wanted to block out a particular instruction from use in my program. I thought to define the instruction as a macro, and ERR inside the macro. However, to my surprise, you don't appear to be able to redefine an instruction.
In my tests, the macro is never instantiated. Perhaps the documentation needs updating to indicate - or is it possible to 'fix' this issue?