From: bal Date: Wed, 23 Jan 1985 16:31:51 +0000 (+0000) Subject: bug fixed: the "incr" parameter of sbrk() is a 2-byte integer, X-Git-Tag: release-5-5~5714 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=1732114593458616a42cfd1ed95959b7d5fa7022;p=ack.git bug fixed: the "incr" parameter of sbrk() is a 2-byte integer, not a 4-byte integer. --- diff --git a/mach/m68k2/libsys/brk.s b/mach/m68k2/libsys/brk.s index f337c0533..0d33d0739 100644 --- a/mach/m68k2/libsys/brk.s +++ b/mach/m68k2/libsys/brk.s @@ -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 diff --git a/mach/m68k4/libsys/brk.s b/mach/m68k4/libsys/brk.s index f337c0533..0d33d0739 100644 --- a/mach/m68k4/libsys/brk.s +++ b/mach/m68k4/libsys/brk.s @@ -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