1
0
mirror of https://github.com/hsoft/collapseos.git synced 2025-04-05 06:38:40 +11:00

Inlined parseDecimalDigit

See previous commit, and /lib/parse.asm, for details
This commit is contained in:
Clanmaster21 2019-10-13 13:52:46 +01:00 committed by GitHub
parent 9797405789
commit ed1643dc00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,7 +89,8 @@ cmdParse:
jr z, .dot jr z, .dot
cp '$' cp '$'
jr z, .eof jr z, .eof
call parseDecimalDigit add a, 0xc6 ; inline ParseDecimalDigit
sub 0xf6
jr c, .notHandled jr c, .notHandled
; straight number ; straight number
ld a, ABSOLUTE ld a, ABSOLUTE
@ -121,7 +122,8 @@ cmdParse:
inc hl ; advance cmd cursor inc hl ; advance cmd cursor
ld a, (hl) ld a, (hl)
ld de, 1 ; if .pmNoSuffix ld de, 1 ; if .pmNoSuffix
call parseDecimalDigit add a, 0xc6 ; Inline ParseDecimalDigit
sub 0xf6
jr c, .pmNoSuffix jr c, .pmNoSuffix
call .parseDecimalM ; --> DE call .parseDecimalM ; --> DE
.pmNoSuffix: .pmNoSuffix:
@ -149,7 +151,8 @@ cmdParse:
.loop: .loop:
inc hl inc hl
ld a, (hl) ld a, (hl)
call parseDecimalDigit add a, 0xc6 ; Inline ParseDecimalDigit
sub 0xf6
jr nc, .loop jr nc, .loop
; We're at the first non-digit char. Let's save it because we're going ; We're at the first non-digit char. Let's save it because we're going
; to temporarily replace it with a null. ; to temporarily replace it with a null.