bug fixed: the "incr" parameter of sbrk() is a 2-byte integer,

not a 4-byte integer.
This commit is contained in:
bal 1985-01-23 16:31:51 +00:00
parent 66eabbcddf
commit 1732114593
2 changed files with 10 additions and 8 deletions

View file

@ -3,14 +3,15 @@
.extern _brk .extern _brk
.extern _sbrk .extern _sbrk
.text .text
_sbrk: move.l nd,d0 _sbrk: move.l nd,a0
add.l d0, 4(sp) add.w 4(sp),a0
move.w #0x11,d0 move.w #0x11,d0
move.l 4(sp),a0
trap #0 trap #0
bcs lcerror bcs lcerror
move.l nd,d0 move.l nd,d0
move.l 4(sp),nd move.l d0,a0
add.w 4(sp),a0
move.l a0,nd
rts rts
lcerror: jmp cerror lcerror: jmp cerror
_brk: move.w #0x11,d0 _brk: move.w #0x11,d0

View file

@ -3,14 +3,15 @@
.extern _brk .extern _brk
.extern _sbrk .extern _sbrk
.text .text
_sbrk: move.l nd,d0 _sbrk: move.l nd,a0
add.l d0, 4(sp) add.w 4(sp),a0
move.w #0x11,d0 move.w #0x11,d0
move.l 4(sp),a0
trap #0 trap #0
bcs lcerror bcs lcerror
move.l nd,d0 move.l nd,d0
move.l 4(sp),nd move.l d0,a0
add.w 4(sp),a0
move.l a0,nd
rts rts
lcerror: jmp cerror lcerror: jmp cerror
_brk: move.w #0x11,d0 _brk: move.w #0x11,d0