ack/mach/mantra/libsys/brk.s

32 lines
425 B
ArmAsm
Raw Normal View History

1987-02-02 10:25:38 +00:00
.define _brk
.define _sbrk
.extern _brk
.extern _sbrk
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1987-03-30 12:35:46 +00:00
_sbrk: move.l nd,a0
1987-02-02 10:25:38 +00:00
add.l 4(sp),a0
move.l #0x11,d0
trap #0
bcs lcerror
1987-03-30 12:35:46 +00:00
move.l nd,d0
1987-02-02 10:25:38 +00:00
move.l d0,a0
add.l 4(sp),a0
1987-03-30 12:35:46 +00:00
move.l a0,nd
1987-02-02 10:25:38 +00:00
rts
lcerror: jmp cerror
_brk: move.l #0x11,d0
move.l 4(sp),a0
trap #0
bcs lcerror
1987-03-30 12:35:46 +00:00
move.l 4(sp),nd
1987-02-02 10:25:38 +00:00
clr.l d0
rts
1987-03-30 12:35:46 +00:00
.sect .data
nd:
.data4 endbss
.sect .text