From f9118ef88ebed1493c719a13b44ec8a7d92c1c3e Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Mon, 27 May 2019 12:05:42 -0400 Subject: [PATCH] xasm: expand ERR_BAD_ARG condition --- apps/zasm/instr.asm | 6 +++--- tools/tests/zasm/errtests.sh | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/zasm/instr.asm b/apps/zasm/instr.asm index e13ece3..2971c6a 100644 --- a/apps/zasm/instr.asm +++ b/apps/zasm/instr.asm @@ -806,9 +806,9 @@ parseInstruction: ld a, INSTR_TBL_ROWSIZE call addDE djnz .loop - ; no match - xor a - jr .end + ; No signature match + ld a, ERR_BAD_ARG + jr .error .match: ; We have our matching instruction row. We're getting pretty near our ; goal here! diff --git a/tools/tests/zasm/errtests.sh b/tools/tests/zasm/errtests.sh index c70d8a3..c323c4b 100755 --- a/tools/tests/zasm/errtests.sh +++ b/tools/tests/zasm/errtests.sh @@ -18,5 +18,6 @@ chkerr() { chkerr "foo" 1 chkerr "ld a, foo" 2 +chkerr "ld a, hl" 2 chkerr "ld a," 3 chkerr "ld a, 'A" 3