Skip to content

Commit 491f4d9

Browse files
Some fixes
1 parent 49f74f2 commit 491f4d9

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CEdev/lib/src/std/atoi.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ _atoi:
1111
push bc
1212
ld bc,10
1313
push bc
14-
ld c,0
14+
ld c,b
1515
push bc
1616
push de
1717
call _strtol

CEdev/lib/src/std/bshrs.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
.assume adl=1
1717

1818
__bshrs:
19-
ld a,b
19+
push bc
2020
inc b
2121
jr test
2222

@@ -25,5 +25,5 @@ loop:
2525
test:
2626
djnz loop
2727

28-
ld b,a
28+
pop bc
2929
ret

CEdev/lib/src/std/calloc.asm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ _calloc:
1717
add hl,de
1818
or a,a
1919
sbc hl,de
20+
pop bc
2021
ex de,hl
21-
pop hl
2222
ret z
23-
push hl
23+
push bc
2424
or a,a
2525
sbc hl,hl
2626
push hl
2727
push de
2828
call _memset
2929
pop hl
30+
pop bc
31+
pop bc
3032
ret

0 commit comments

Comments
 (0)