ack/mach/vax4/libbsd4_2/brk.s

26 lines
306 B
ArmAsm
Raw Permalink Normal View History

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