ack/mach/pmds4/libsys/sbrk.s

34 lines
442 B
ArmAsm
Raw Normal View History

1985-02-07 22:59:50 +00:00
.define _sbrk
.define _brk
1987-01-26 21:22:23 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1985-02-07 22:59:50 +00:00
.extern _sbrk
.extern _brk
_sbrk: tst.b -8(sp)
move.l 4(sp),d0
beq 1f
1985-03-04 16:11:26 +00:00
add.l .reghp,d0
1985-02-07 22:59:50 +00:00
move.l d0,-(sp)
clr.l -(sp)
trap #0
1987-01-26 21:22:23 +00:00
.data2 0x11
1985-02-07 22:59:50 +00:00
add.l #8,sp
bcc 1f
jmp cerror
1:
1985-03-04 16:11:26 +00:00
move.l .reghp,d0
1985-02-07 22:59:50 +00:00
move.l 4(sp),d1
1985-03-04 16:11:26 +00:00
add.l d1,.reghp
1985-02-07 22:59:50 +00:00
rts
_brk: trap #0
1987-01-26 21:22:23 +00:00
.data2 0x11
1985-02-07 22:59:50 +00:00
bcc 1f
jmp cerror
1:
1985-03-04 16:11:26 +00:00
move.l 4(sp),.reghp
1985-02-07 22:59:50 +00:00
clr.l d0
rts