From 1732114593458616a42cfd1ed95959b7d5fa7022 Mon Sep 17 00:00:00 2001 From: bal Date: Wed, 23 Jan 1985 16:31:51 +0000 Subject: [PATCH] bug fixed: the "incr" parameter of sbrk() is a 2-byte integer, not a 4-byte integer. --- mach/m68k2/libsys/brk.s | 9 +++++---- mach/m68k4/libsys/brk.s | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) 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 -- 2.34.1