The inline assembler instruction 'ld l, iyh' doesn't exist in z80. When used, it gets compiled (correctly) to 'ld iyl,iyh' which is not what I intended.
I'd prefer this to show an invalid instruction rather than compile successfully to something else.
The below code compiles:
/// GPL 2.0 or later
void main() {
__asm
ld l, iyh
__endasm;
}
looking at the assembler output:
sdcc --no-std-crt0 -mz80 --allow-undocumented-instructions --fverbose-asm ./ldliyh.c -o ldliyh.ihx
objcopy --input-target=ihex --output-target=binary ldliyh.ihx ldliyh.rom
$ z80dasm ./ldliyh.rom
; z80dasm 1.1.6
; command line: z80dasm ./ldliyh.rom
org 00100h
defb 0fdh,06ch ;ld iyl,iyh
ret
sdcc -v
SDCC : z80/sm83/z80n/mos6502/mos65c02 TD- 4.4.0 #14620 (Linux)
Fixed in the next branch in [r14644].
Related
Commit: [r14644]
Fixed by merging next branch to trunk.