ack/mach/vax4/libsysV_2/sbrk.s
1990-01-22 13:58:54 +00:00

38 lines
415 B
ArmAsm

.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
break = 17
.define _sbrk
.define _brk
_sbrk:
.data2 0x0000
movl .limhp,r0
tstl 4(ap)
jeql 3f
addl3 r0,4(ap),-(sp)
bcs 1f
pushl $1
movl ap,r3
movl sp,ap
chmk $break
bcc 2f
1:
jmp cerror
2:
movl .limhp,r0
addl2 4(r3),.limhp
3:
ret
.define _brk
_brk:
.data2 0x0000
chmk $break
bcc 1f
jmp cerror
1:
movl 4(ap),.limhp
clrl r0
ret