Skip to content

Commit 2475849

Browse files
Optimize acos
1 parent 0c7cee2 commit 2475849

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

CEdev/lib/src/std/acos.asm

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,23 @@ _acos:
3333
call __fcmp
3434
jp p,l_2
3535

36-
l_1: ld bc,4
37-
ld (_errno),bc
38-
xor a,a
39-
sbc hl,hl
36+
l_1: ld hl,4
37+
ld (_errno),hl
38+
ld l,h
39+
ld e,h
4040
jr l_3
4141

4242
l_2: ld c,(ix+9)
43-
ld b,0
4443
push bc
4544
ld bc,(ix+6)
4645
push bc
4746
call _asin
48-
ld sp,ix
4947
ld bc,13176795
5048
ld a,63
5149
call __fsub
5250
ld hl,bc
51+
ld e,a
5352

54-
l_3: ld e,a
55-
ld sp,ix
53+
l_3: ld sp,ix
5654
pop ix
5755
ret

0 commit comments

Comments
 (0)