Skip to content

Commit 08a966a

Browse files
Opt acos
1 parent 2475849 commit 08a966a

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

CEdev/lib/src/std/acos.asm

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,22 @@
1717
; }
1818

1919
_acos:
20-
call __frameset0
20+
pop hl
21+
pop de
22+
pop bc
23+
push bc
24+
push de
25+
push hl
26+
ld a,e
2127
ld hl,8388608
2228
ld e,63
23-
ld bc,(ix+6)
24-
ld a,(ix+9)
2529
push bc
2630
push hl
2731
call __fcmp
2832
pop bc
2933
pop hl
3034
jp m,l_1
31-
ld e,(ix+9)
35+
ld e,a
3236
ld a,191
3337
call __fcmp
3438
jp p,l_2
@@ -37,19 +41,14 @@ l_1: ld hl,4
3741
ld (_errno),hl
3842
ld l,h
3943
ld e,h
40-
jr l_3
44+
ret
4145

42-
l_2: ld c,(ix+9)
43-
push bc
44-
ld bc,(ix+6)
45-
push bc
46+
l_2: push de
47+
push hl
4648
call _asin
4749
ld bc,13176795
4850
ld a,63
4951
call __fsub
5052
ld hl,bc
5153
ld e,a
52-
53-
l_3: ld sp,ix
54-
pop ix
5554
ret

0 commit comments

Comments
 (0)