corrected
This commit is contained in:
parent
0710269e32
commit
7cb9955f82
4 changed files with 18 additions and 21 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -2,5 +2,4 @@
|
|||
.define _brk
|
||||
.sect .text
|
||||
_brk:
|
||||
mov ax,17
|
||||
jmp sysal
|
||||
jmp __brk
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue