1990-01-11 16:00:19 +00:00
|
|
|
.sect .text; .sect .rom; .sect .data; .sect .bss
|
|
|
|
.sect .text
|
|
|
|
break = 17
|
|
|
|
.define _sbrk
|
|
|
|
.define _brk
|
|
|
|
.define _end
|
1986-12-12 12:49:50 +00:00
|
|
|
|
|
|
|
.align 1
|
|
|
|
_sbrk:
|
1990-01-11 16:00:19 +00:00
|
|
|
.data2 0x0000
|
|
|
|
addl3 Ibrk,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-11 16:00:19 +00:00
|
|
|
movl Ibrk,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-11 16:00:19 +00:00
|
|
|
movl 4(ap),Ibrk
|
1986-12-12 12:49:50 +00:00
|
|
|
clrl r0
|
|
|
|
ret
|
|
|
|
|
1990-01-11 16:00:19 +00:00
|
|
|
.sect .data
|
|
|
|
Ibrk: .data4 _end
|