This code
.z80
.allow_undocumented
ld a, iyl
gives the error
test.s:2: Error: <o> .org in REL area or directive / mnemonic error
test.s:3: Error: <a> machine specific addressing or addressing mode error
removing
Interestingly, it works with .z180 instead of .z80 (where it is less useful - AFAIK the z180 does trap on undocumented instructions).
The bug is unresolved, the .allow_undocumented directive is not working.
Yes, it looks broken.
Since Z80N looks like being a superset of Z80, you could use
.zxnas a workaround for handwritten asm..zxnand.ez80enable undocumented instructions by default.Last edit: Sebastian Riedel 2022-03-15
Now it says:
I had to fix the error printing first for tracking it down. sdas printed general error messages instead of using the strings actually thrown.
Internal Opcode Errormeanscase X_UNDOCD:does not trigger at all..allow_undocumentedandsllwere intentionally or accidentally disabled for z80.Should be fixed in [r13287]
Related
Commit: [r13287]
What does hd64180 on undocumented instructions? I could throw an error if one tries to enable
.allow_undocumentedon these targets.But only if that’s the case on hd64180 and z180, because they are the same for asz80.
Last edit: Sebastian Riedel 2022-03-24
Since they both trap, I disabled it in [r13296]
Related
Commit: [r13296]
I didn't understand if .allow_undocumented is supposed to work or not after all?
Anyway, if I try to add this directive to my assembler code, I get this error:
Error: <o> .org in REL area or directive / mnemonic errorAFAIK, it is working in current snaphots (or SDCC built from source) since late March. It works for me. In SDCC 4.2.0 it AFAIK was still broken.
Though for 4.2.0 the
.zxnworkaround described above should work.Can you confirm that this works for you in a current snapshot?