Perhaps a bad idea, but I'm using dasm to write a program for the MC6800. 6803 code is backwards compatible with 6800's documented instructions, so I thought it'd be a safe thing to do.
However, I just encountered a problem:
On a 6800, this would use extended addressing, since there's no direct (zero-page) JSR there, so it would be assembled into $BD $0040. The 6803 does have a direct JSR instruction though, and dasm will obviously use it, creating code that's not compatible with 6800.
In this specific case, it's even worse. The opcode for direct JSR on 6803 is $9D, which on the 6800 was an undocumented opcode: The mythical "halt and catch fire"!
Anyway, my actual question is this: I realize dasm doesn't support 6800 and that maybe I should use something else, but is there a way to force it to use extended addressing in cases like this, without simply inputting the raw bytes?
The text was updated successfully, but these errors were encountered:
When an instruction supports direct and extended addressing mode the < character
can be used to force direct mode and the > character forces extended mode. Otherwise
the assembler selects the best mode automatically, which defaults to extended mode
for external symbols.
My admin-gurus at the university used to say: "You've got the sources, luke .." (especcially when docs where missing ;-)
src/main.c around line 1030 you should find it.
With dasm this extension works for any opcode where both addressing modes are available.