1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 15:48:04 +11:00

Wohoo! zasm assembles core.asm!!!

This commit is contained in:
Virgil Dupras 2019-05-14 16:50:35 -04:00
parent b0218349ff
commit a994867a86
2 changed files with 7 additions and 4 deletions

View File

@ -21,6 +21,9 @@ cmpas() {
fi fi
} }
echo "Comparing core.asm"
cmpas ../../../parts/z80/core.asm
for fn in *.asm; do for fn in *.asm; do
echo "Comparing ${fn}" echo "Comparing ${fn}"
cmpas $fn cmpas $fn

View File

@ -159,7 +159,7 @@ fmtHexPair:
dec hl dec hl
pop af pop af
push af push af
and a, 0xf0 and 0xf0
rra \ rra \ rra \ rra rra \ rra \ rra \ rra
call fmtHex call fmtHex
ld (hl), a ld (hl), a
@ -178,7 +178,7 @@ parseHex:
cp '9'+1 cp '9'+1
jr nc, .alpha ; if >= '9'+1, we might have alpha jr nc, .alpha ; if >= '9'+1, we might have alpha
; We are in the 0-9 range ; We are in the 0-9 range
sub a, '0' ; C is clear sub '0' ; C is clear
ret ret
.alpha: .alpha:
@ -188,7 +188,7 @@ parseHex:
cp 'F'+1 cp 'F'+1
jr nc, .error ; if >= 'F', we have a problem jr nc, .error ; if >= 'F', we have a problem
; We have alpha. ; We have alpha.
sub a, 'A'-10 ; C is clear sub 'A'-10 ; C is clear
ret ret
.error: .error:
@ -223,7 +223,7 @@ parseHexPair:
; If we have a single digit, our result is already stored in B, but ; If we have a single digit, our result is already stored in B, but
; we have to right-shift it back. ; we have to right-shift it back.
ld a, b ld a, b
and a, 0xf0 and 0xf0
rra \ rra \ rra \ rra rra \ rra \ rra \ rra
dec hl dec hl