mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-30 22:18:06 +11:00
Wohoo! zasm assembles core.asm!!!
This commit is contained in:
parent
b0218349ff
commit
a994867a86
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user