ack/mach/i86/libsys/_sbrk.s

25 lines
279 B
ArmAsm
Raw Normal View History

1990-01-19 17:05:29 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
.define __sbrk
__sbrk:
push bp
mov bp,sp
mov ax,4(bp)
1990-01-22 16:48:13 +00:00
mov bx,(.limhp)
1990-01-19 17:05:29 +00:00
add ax,bx
mov cx,sp
sub cx,128
sub cx,ax
jbe 1f
1990-01-22 16:48:13 +00:00
mov (.limhp),ax
1990-01-19 17:05:29 +00:00
sub ax,bx
jbe 2f
call xbrk
2:
mov ax,bx
pop bp
ret
1:
mov ax,0xc
pop bp
jmp cerror