Skip to content

Commit 570f85d

Browse files
ZERICO2005mateoconlechuga
authored andcommitted
Optimized __setflag, removed float64_to_int.c
1 parent f5c00f1 commit 570f85d

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

src/crt/os.src

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ __ishru_b := 000188h
3030
__itol := 000194h
3131
public __ltof
3232
__ltof := 000284h
33-
public __setflag
34-
__setflag := 000218h
3533
public __sshl_b
3634
__sshl_b := 000244h
3735
public __sshrs_b

src/crt/setflag.src

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
assume adl=1
2+
3+
section .text
4+
5+
public __setflag
6+
7+
if PREFER_OS_CRT
8+
9+
__setflag := 000218h
10+
11+
else
12+
13+
__setflag:
14+
ret po
15+
push af
16+
ex (sp), hl
17+
ld a, l
18+
xor a, $80 ; invert S flag
19+
ld l, a
20+
ex (sp), hl
21+
pop af
22+
ret
23+
24+
end if

0 commit comments

Comments
 (0)