From 36ec4e7d9be760da2943ed854629390b325cb6ba Mon Sep 17 00:00:00 2001 From: Matthew Waltz Date: Thu, 24 Oct 2024 20:37:30 -0600 Subject: [PATCH] [libc] add _isblank --- src/libc/include/ctype.h | 2 ++ src/libc/isblank.src | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/libc/isblank.src diff --git a/src/libc/include/ctype.h b/src/libc/include/ctype.h index 1543446fb..60c3d639e 100644 --- a/src/libc/include/ctype.h +++ b/src/libc/include/ctype.h @@ -9,6 +9,8 @@ int isalnum(int c); int isalpha(int c); +int isblank(int c); + int iscntrl(int c); int isdigit(int c); diff --git a/src/libc/isblank.src b/src/libc/isblank.src new file mode 100644 index 000000000..a6a780d57 --- /dev/null +++ b/src/libc/isblank.src @@ -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