Skip to content

Commit 45e9495

Browse files
committed
Added rotate24/48 in <ez80_builtin.h> alongside other missing __builtin functions. Also fixed <stdbit.h> and <bit>
1 parent 15fc6b8 commit 45e9495

File tree

18 files changed

+1307
-127
lines changed

18 files changed

+1307
-127
lines changed

src/crt/i48add.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ __i48add:
1515
adc hl, bc
1616
pop bc
1717
ex de, hl
18-
ret
18+
ret

src/crt/i48add_1.src

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
; Performs 48-bit addition
2+
;
3+
; Returns:
4+
; ude:uhl = ude:uhl + 1
5+
6+
assume adl=1
7+
8+
section .text
9+
10+
public __i48add_1
11+
__i48add_1:
12+
inc hl
13+
add hl, de
14+
or a, a
15+
sbc hl, de
16+
ret nz
17+
; carry
18+
inc de
19+
ret

src/crt/i48sub.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ __i48sub:
1616
sbc hl, bc
1717
pop bc
1818
ex de, hl
19-
ret
19+
ret

src/crt/i48sub_1.src

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
; Performs 48-bit subtraction
2+
;
3+
; Returns:
4+
; ude:uhl = ude:uhl - 1
5+
6+
assume adl=1
7+
8+
section .text
9+
10+
public __i48sub_1
11+
__i48sub_1:
12+
add hl, de
13+
or a, a
14+
sbc hl, de
15+
dec hl
16+
ret nz
17+
; carry
18+
dec de
19+
ret

src/libc/bswap24.src

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/libc/bswap48.src

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)