From ff378482a2b18b8cbc5c1a01754d4502b7a8a5cb Mon Sep 17 00:00:00 2001 From: BlastBrothers Date: Wed, 10 Jul 2024 07:25:57 -0400 Subject: [PATCH 1/2] delete tolower and toupper --- src/libc/tolower.src | 26 -------------------------- src/libc/toupper.src | 26 -------------------------- 2 files changed, 52 deletions(-) delete mode 100644 src/libc/tolower.src delete mode 100644 src/libc/toupper.src diff --git a/src/libc/tolower.src b/src/libc/tolower.src deleted file mode 100644 index 23f09a0..0000000 --- a/src/libc/tolower.src +++ /dev/null @@ -1,26 +0,0 @@ - assume adl=1 - - section .text - public _tolower - -if PREFER_OS_LIBC - -_tolower := 021E34h - -else - -_tolower: - pop de - ex (sp), hl - push de - - ld a, l - sub a, 'A' - cp a, 1+'Z'-'A' - ret nc - - add a, 'a' - ld l, a - ret - -end if diff --git a/src/libc/toupper.src b/src/libc/toupper.src deleted file mode 100644 index aa28ddb..0000000 --- a/src/libc/toupper.src +++ /dev/null @@ -1,26 +0,0 @@ - assume adl=1 - - section .text - public _toupper - -if PREFER_OS_LIBC - -_toupper := 021E38h - -else - -_toupper: - pop de - ex (sp), hl - push de - - ld a, l - sub a, 'a' - cp a, 1+'z'-'a' - ret nc - - add a, 'A' - ld l, a - ret - -end if From 278a46bdd301234479f3a27457a3d37d2b3864f0 Mon Sep 17 00:00:00 2001 From: BlastBrothers Date: Wed, 10 Jul 2024 08:01:24 -0400 Subject: [PATCH 2/2] delete a third one --- src/libc/strncasecmp.src | 48 ---------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 src/libc/strncasecmp.src diff --git a/src/libc/strncasecmp.src b/src/libc/strncasecmp.src deleted file mode 100644 index 95b6d29..0000000 --- a/src/libc/strncasecmp.src +++ /dev/null @@ -1,48 +0,0 @@ - assume adl=1 - - section .text - public _strncasecmp - -_strncasecmp: - push ix - ld ix,0 - add ix,sp - dec sp -loop: - ld hl,(ix+12) - add hl,de - or a,a - sbc hl,de - jr z,done - dec hl - ld (ix+12),hl - ld hl,(ix+6) - ld c,(hl) - inc hl - ld (ix+6),hl - push bc - call _tolower - pop bc - ld (ix-1),l - ld hl,(ix+9) - ld c,(hl) - inc hl - ld (ix+9),hl - push bc - call _tolower - pop bc - ex de,hl - sub a,a - sbc hl,hl - ld l,(ix-1) - sbc hl,de - jr nz,done - ld a,(ix-1) - or a,e - jr nz,loop -done: - ld sp,ix - pop ix - ret - - extern _tolower