From a994867a865054f49b8095ffa9534675c306bcd0 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Tue, 14 May 2019 16:50:35 -0400 Subject: [PATCH] Wohoo! zasm assembles core.asm!!! --- apps/zasm/tests/runtests.sh | 3 +++ parts/z80/core.asm | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/zasm/tests/runtests.sh b/apps/zasm/tests/runtests.sh index 9cbb3ca..34ae4fd 100755 --- a/apps/zasm/tests/runtests.sh +++ b/apps/zasm/tests/runtests.sh @@ -21,6 +21,9 @@ cmpas() { fi } +echo "Comparing core.asm" +cmpas ../../../parts/z80/core.asm + for fn in *.asm; do echo "Comparing ${fn}" cmpas $fn diff --git a/parts/z80/core.asm b/parts/z80/core.asm index 8dca25b..5a2473e 100644 --- a/parts/z80/core.asm +++ b/parts/z80/core.asm @@ -159,7 +159,7 @@ fmtHexPair: dec hl pop af push af - and a, 0xf0 + and 0xf0 rra \ rra \ rra \ rra call fmtHex ld (hl), a @@ -178,7 +178,7 @@ parseHex: cp '9'+1 jr nc, .alpha ; if >= '9'+1, we might have alpha ; We are in the 0-9 range - sub a, '0' ; C is clear + sub '0' ; C is clear ret .alpha: @@ -188,7 +188,7 @@ parseHex: cp 'F'+1 jr nc, .error ; if >= 'F', we have a problem ; We have alpha. - sub a, 'A'-10 ; C is clear + sub 'A'-10 ; C is clear ret .error: @@ -223,7 +223,7 @@ parseHexPair: ; If we have a single digit, our result is already stored in B, but ; we have to right-shift it back. ld a, b - and a, 0xf0 + and 0xf0 rra \ rra \ rra \ rra dec hl