Skip to content

Commit 6ed5cbd

Browse files
authored
Added __frem to CRT (wraps fmodf) (#537)
1 parent bbb2b81 commit 6ed5cbd

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/crt/frem.src

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
assume adl=1
2+
3+
section .text
4+
5+
public __frem
6+
7+
; wraps _fmodf
8+
__frem:
9+
push de, hl
10+
11+
push de, hl ; y
12+
ld e, a
13+
push de ; x_hi8
14+
push bc ; x_lo24
15+
call _fmodf
16+
pop hl, hl, hl, hl
17+
18+
pop hl, de
19+
ret
20+
21+
extern _fmodf

0 commit comments

Comments
 (0)