ack/mach/m68k4/libsys/brk.s

28 lines
398 B
ArmAsm
Raw Normal View History

1984-12-14 15:52:15 +00:00
.define _brk
.define _sbrk
.extern _brk
.extern _sbrk
1986-07-22 13:23:14 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1985-03-04 17:26:31 +00:00
_sbrk: move.l .reghp,a0
add.l 4(sp),a0
1984-12-14 15:52:15 +00:00
move.w #0x11,d0
trap #0
bcs lcerror
1985-03-04 17:26:31 +00:00
move.l .reghp,d0
move.l d0,a0
1985-03-04 17:26:31 +00:00
add.l 4(sp),a0
move.l a0,.reghp
1984-12-14 15:52:15 +00:00
rts
lcerror: jmp cerror
_brk: move.w #0x11,d0
move.l 4(sp),a0
trap #0
bcs lcerror
1985-03-04 17:26:31 +00:00
move.l 4(sp),.reghp
1984-12-14 15:52:15 +00:00
clr.l d0
rts