corrected
authorceriel <none@none>
Mon, 22 Jan 1990 17:07:11 +0000 (17:07 +0000)
committerceriel <none@none>
Mon, 22 Jan 1990 17:07:11 +0000 (17:07 +0000)
mach/xenix3/libsys/_brk.s
mach/xenix3/libsys/_sbrk.s
mach/xenix3/libsys/brk.s
mach/xenix3/libsys/sbrk.s

index 23e2e64..68892e5 100644 (file)
@@ -3,4 +3,14 @@
 .sect .text
 __brk:
        mov     ax,17
-       jmp     sysal
+       push    bp
+       mov     bp,sp
+       mov     bx,4(bp)
+       call    syscal
+       mov     dx,bx
+       pop     bp
+       jb      cerror
+       mov     bx,sp
+       mov     dx,2(bx)
+       mov     (.limhp),dx
+       ret
index af08b7f..67dbf1a 100644 (file)
@@ -13,6 +13,11 @@ __sbrk:
        push    ax
        call    __brkctl
        add     sp,8
+       cmp     ax,-1
+       je      1f
+1:
+       mov     dx,4(bp)
+       add     (.limhp),dx
        pop     bp
        ret
 
index 8da1330..29ea235 100644 (file)
@@ -2,5 +2,4 @@
 .define _brk
 .sect .text
 _brk:
-       mov     ax,17
-       jmp     sysal
+       jmp     __brk
index 9389ff6..320c604 100644 (file)
@@ -2,21 +2,4 @@
 .define _sbrk
 .sect .text
 _sbrk:
-       push    bp
-       mov     bp,sp
-       push    ds
-       mov     ax,4(bp)
-       cwd
-       push    dx
-       push    ax
-       mov     ax,1
-       push    ax
-       call    __brkctl
-       add     sp,8
-       pop     bp
-       ret
-
-
-__brkctl:
-       mov     ax,4904
-       jmp     sysal
+       jmp     __sbrk