ack/mach/m68020/libsys/brk.s

26 lines
378 B
ArmAsm
Raw Normal View History

1987-01-29 22:36:35 +00:00
.define _brk
.define _sbrk
.extern _brk
.extern _sbrk
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1990-01-22 15:03:13 +00:00
_sbrk: move.l (.limhp),d0
1987-01-29 22:36:35 +00:00
add.l d0,(4,sp)
move.l #0x11,d0
trap #0
bcs lcerror
1990-01-22 15:03:13 +00:00
move.l (.limhp),d0
1987-01-29 22:36:35 +00:00
move.l d0,a0
1990-01-22 15:03:13 +00:00
move.l (4,sp),(.limhp)
1987-01-29 22:36:35 +00:00
rts
lcerror: jmp (cerror)
_brk: move.l #0x11,d0
trap #0
bcs lcerror
1990-01-22 15:03:13 +00:00
move.l (4,sp),(.limhp)
1987-01-29 22:36:35 +00:00
clr.l d0
rts