ack/mach/vax4/libsysV_2/sbrk.s

38 lines
415 B
ArmAsm
Raw 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
1987-02-02 16:06:51 +00:00
_sbrk:
1990-01-11 16:00:19 +00:00
.data2 0x0000
1990-01-22 13:58:54 +00:00
movl .limhp,r0
1987-02-02 16:06:51 +00:00
tstl 4(ap)
1990-01-11 16:00:19 +00:00
jeql 3f
1987-02-02 16:06:51 +00:00
addl3 r0,4(ap),-(sp)
1990-01-11 16:00:19 +00:00
bcs 1f
1987-02-02 16:06:51 +00:00
pushl $1
movl ap,r3
movl sp,ap
chmk $break
1990-01-11 16:00:19 +00:00
bcc 2f
1:
1987-02-02 16:06:51 +00:00
jmp cerror
1990-01-11 16:00:19 +00:00
2:
1990-01-22 13:58:54 +00:00
movl .limhp,r0
addl2 4(r3),.limhp
1990-01-11 16:00:19 +00:00
3:
1987-02-02 16:06:51 +00:00
ret
1990-01-11 16:00:19 +00:00
.define _brk
1987-02-02 16:06:51 +00:00
_brk:
1990-01-11 16:00:19 +00:00
.data2 0x0000
1987-02-02 16:06:51 +00:00
chmk $break
1990-01-11 16:00:19 +00:00
bcc 1f
1987-02-02 16:06:51 +00:00
jmp cerror
1990-01-11 16:00:19 +00:00
1:
1990-01-22 13:58:54 +00:00
movl 4(ap),.limhp
1987-02-02 16:06:51 +00:00
clrl r0
ret