ack/mach/vax4/libbsd4_1a/sbrk.s

32 lines
393 B
ArmAsm
Raw Permalink Normal View History

1990-01-11 16:00:19 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
break = 17
.define _sbrk
.define _brk
1986-12-12 12:49:50 +00:00
.align 1
_sbrk:
1990-01-11 16:00:19 +00:00
.data2 0x0000
1990-01-22 14:14:38 +00:00
addl3 .limhp,4(ap),-(sp)
1986-12-12 12:49:50 +00:00
bcc 1f
1990-01-11 16:00:19 +00:00
movl $0xFFFFFFFF,(sp) ! will cause an error (I hope)
1986-12-12 12:49:50 +00:00
1:
1990-01-22 14:14:38 +00:00
movl .limhp,r3
1986-12-12 12:49:50 +00:00
calls $1,_brk
tstl r0
blss 1f
movl r3,r0
1:
ret
.align 1
_brk:
1990-01-11 16:00:19 +00:00
.data2 0x0000
1986-12-12 12:49:50 +00:00
chmk $break
bcc 1f
jmp errmon
1:
1990-01-22 14:14:38 +00:00
movl 4(ap),.limhp
1986-12-12 12:49:50 +00:00
clrl r0
ret