ack/mach/vax4/libbsd4_2/_brk.s

26 lines
308 B
ArmAsm
Raw Normal View History

1990-01-19 17:22:11 +00:00
#include "syscall.h"
DEFINE(__brk)
1990-01-22 14:08:16 +00:00
cmpl 4(ap),$endbss
1990-01-19 17:22:11 +00:00
bgeq Iok
1990-01-22 14:08:16 +00:00
movl $endbss,4(ap)
1990-01-19 17:22:11 +00:00
Iok:
chmk $17
bcs Ierr
1990-01-22 14:08:16 +00:00
movl 4(ap),.limhp
1990-01-19 17:22:11 +00:00
clrl r0
ret
Ierr:
jmp cerror
DEFINE(__sbrk)
1990-01-22 14:08:16 +00:00
addl3 .limhp,4(ap),-(sp)
1990-01-19 17:22:11 +00:00
bcs Ierr
pushl $1
movl ap,r3
movl sp,ap
chmk $17
bcs Ierr
1990-01-22 14:08:16 +00:00
movl .limhp,r0
addl2 4(r3),.limhp
1990-01-19 17:22:11 +00:00
ret