Skip to content

Commit

Permalink
[libc] add _isblank
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoconlechuga committed Oct 25, 2024
1 parent fa54eed commit 36ec4e7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libc/include/ctype.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ int isalnum(int c);

int isalpha(int c);

int isblank(int c);

int iscntrl(int c);

int isdigit(int c);
Expand Down
16 changes: 16 additions & 0 deletions src/libc/isblank.src
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
assume adl=1

section .text
public _isblank
_isblank:
pop de
ex (sp),hl
push de
ld a,l
cp a,32
ret z
cp a,9
ret z
or a,a
sbc hl,hl
ret

0 comments on commit 36ec4e7

Please sign in to comment.