We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04412f4 commit 9b14449Copy full SHA for 9b14449
1 file changed
src/libc/truncl.src
@@ -11,7 +11,7 @@ _truncl:
11
ld hl, (iy + 9)
12
ld a, h
13
add.s hl, hl
14
- ld de, 0xFF8020 ; -1023 shl 5
+ ld de, 0xFF8020 ; -1023 shl 5
15
add.s hl, de
16
jr nc, .L.ret_zero
17
; ld de, 0xFFF980 ; -52 shl 5
@@ -23,8 +23,8 @@ _truncl:
23
add hl, hl
24
25
26
- ld a, h
27
- neg ; carry will be set as A is not zero
+ xor a, a
+ sub a, h ; carry will be set as H is not zero
28
ld b, a
29
; UINT56_MAX
30
sbc a, a
@@ -40,7 +40,7 @@ _truncl:
40
ex de, hl
41
rla
42
djnz .L.loop
43
- dec b ; b = $FF
+ dec b ; b = $FF
44
ld c, a
45
; values already on the stack
46
jp __lland
0 commit comments