Skip to content

Commit

Permalink
Optimize isdigit, isgraph, islower, isupper
Browse files Browse the repository at this point in the history
Verified to work
  • Loading branch information
myclevorname authored and mateoconlechuga committed Jan 15, 2025
1 parent bcdb456 commit 26ea392
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/libc/isdigit.src
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ _isdigit:
push de
ld a,l
sub a,48
add a,-10
sub a,10
sbc hl,hl
inc hl
ret
3 changes: 1 addition & 2 deletions src/libc/isgraph.src
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ _isgraph:
push de
ld a,l
sub a,33
add a,-94
sub a,94
sbc hl,hl
inc hl
ret
3 changes: 1 addition & 2 deletions src/libc/islower.src
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ _islower:
push de
ld a,l
sub a,97
add a,-26
sub a,26
sbc hl,hl
inc hl
ret
3 changes: 1 addition & 2 deletions src/libc/isupper.src
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ _isupper:
push de
ld a,l
sub a,65
add a,-26
sub a,26
sbc hl,hl
inc hl
ret

0 comments on commit 26ea392

Please sign in to comment.