bug fixed: the "incr" parameter of sbrk() is a 2-byte integer,
not a 4-byte integer.
This commit is contained in:
parent
66eabbcddf
commit
1732114593
2 changed files with 10 additions and 8 deletions
|
@ -3,14 +3,15 @@
|
|||
.extern _brk
|
||||
.extern _sbrk
|
||||
.text
|
||||
_sbrk: move.l nd,d0
|
||||
add.l d0, 4(sp)
|
||||
_sbrk: move.l nd,a0
|
||||
add.w 4(sp),a0
|
||||
move.w #0x11,d0
|
||||
move.l 4(sp),a0
|
||||
trap #0
|
||||
bcs lcerror
|
||||
move.l nd,d0
|
||||
move.l 4(sp),nd
|
||||
move.l d0,a0
|
||||
add.w 4(sp),a0
|
||||
move.l a0,nd
|
||||
rts
|
||||
lcerror: jmp cerror
|
||||
_brk: move.w #0x11,d0
|
||||
|
|
|
@ -3,14 +3,15 @@
|
|||
.extern _brk
|
||||
.extern _sbrk
|
||||
.text
|
||||
_sbrk: move.l nd,d0
|
||||
add.l d0, 4(sp)
|
||||
_sbrk: move.l nd,a0
|
||||
add.w 4(sp),a0
|
||||
move.w #0x11,d0
|
||||
move.l 4(sp),a0
|
||||
trap #0
|
||||
bcs lcerror
|
||||
move.l nd,d0
|
||||
move.l 4(sp),nd
|
||||
move.l d0,a0
|
||||
add.w 4(sp),a0
|
||||
move.l a0,nd
|
||||
rts
|
||||
lcerror: jmp cerror
|
||||
_brk: move.w #0x11,d0
|
||||
|
|
Loading…
Reference in a new issue