Skip to content

Commit

Permalink
[libc] optimize _isdigit
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoconlechuga committed Oct 25, 2024
1 parent 7dcf8ff commit a0ca9d1
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions src/libc/isdigit.src
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,12 @@
section .text
public _isdigit
_isdigit:
pop hl
pop de
ex (sp),hl
push de
push hl
or a,a
ld a,l
sub a,48
add a,-10
sbc hl,hl
bit 7,e
ret nz
ex de,hl
ld de,___maptab
add hl,de
ld a,(hl)
and a,1
sbc hl,hl
ld l,a
inc hl
ret

extern ___maptab

0 comments on commit a0ca9d1

Please sign in to comment.