Skip to content

Commit ee119ba

Browse files
[libc] optimize _ispunct
1 parent 3835d15 commit ee119ba

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/libc/ispunct.src

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
section .text
44
public _ispunct
55
_ispunct:
6-
pop hl
76
pop de
7+
ex (sp),hl
88
push de
9-
push hl
10-
or a,a
9+
ld a,l
10+
sub a,33
11+
cp a,48-33
12+
ret c
13+
sub a,58-33
14+
cp a,65-58
15+
ret c
16+
sub a,91-58
17+
cp a,97-91
18+
ret c
19+
sub a,123-91
20+
cp a,127-123
21+
ret c
1122
sbc hl,hl
12-
bit 7,e
13-
ret nz
14-
ex de,hl
15-
ld de,___maptab
16-
add hl,de
17-
ld a,(hl)
18-
and a,2
19-
sbc hl,hl
20-
ld l,a
21-
ret
22-
23-
extern ___maptab
23+
ret

0 commit comments

Comments
 (0)