sarnau / Z80DisAssembler

I created this small disassembler for a Z80 cpu in one afternoon. It is a commandline tool.
20 stars 5 forks source link

Missing opcodes in z80_assembler: LD SP,HL; LD SP,IX; LD SP,IY #3

Closed Ho-Ro closed 3 months ago

Ho-Ro commented 3 months ago

Hi Markus, found three missing opcodes in the assembler that give error 2. Operand fehlerhaft:

    LD SP,HL
    LD SP,IX
    LD SP,IY

Quick fix:

diff --git a/z80_compile.c b/z80_compile.c
index db65cd7..b2d435f 100755
--- a/z80_compile.c
+++ b/z80_compile.c
@@ -739,7 +739,7 @@ RecalcListP op1Recalc,op2Recalc;
                                 }
                                 *iRAM++ = value2;
                                 *iRAM++ = value2 >> 8;
-                            } else
+                            } else if ( op2 != 0x312 && op2 != 0x330 && op2 != 0x331  )
                                 Error("2.Operand fehlerhaft");
                             break;
                     case 0x330: // IX
sarnau commented 3 months ago

Thanks a lot, I've added it in 98d38d4