diff --git a/apps/zasm/instr.asm b/apps/zasm/instr.asm index af27bdf..52dff9c 100644 --- a/apps/zasm/instr.asm +++ b/apps/zasm/instr.asm @@ -180,6 +180,7 @@ parseArg: ; note: the "-" part isn't supported yet. inc hl ; (HL) now points to X or Y ld a, (hl) + call upcase inc hl ; advance HL to the number part inc hl ; this is the number cp 'Y' diff --git a/tools/emul/zasm/zasm.bin b/tools/emul/zasm/zasm.bin index 7c5a6fa..98c83b5 100644 Binary files a/tools/emul/zasm/zasm.bin and b/tools/emul/zasm/zasm.bin differ diff --git a/tools/tests/zasm/test6.asm b/tools/tests/zasm/test6.asm new file mode 100644 index 0000000..d91189e --- /dev/null +++ b/tools/tests/zasm/test6.asm @@ -0,0 +1,6 @@ +; There was a very nasty bug (cost me a couple of hours of mis-debugging) where +; ld r, (iy+d) would use the 0xdd byte code instead of the correct 0xfd one. +; genallinstrs didn't catch it because it outputs uppercase. Oh sweet mother, +; how much time did I lose over this... + +ld h, (iy+1) diff --git a/tools/tests/zasm/test6.asm.expected b/tools/tests/zasm/test6.asm.expected new file mode 100644 index 0000000..ca54089 --- /dev/null +++ b/tools/tests/zasm/test6.asm.expected @@ -0,0 +1 @@ +ýf \ No newline at end of file