ack/mach/m68020/libsys/_brk.s

26 lines
384 B
ArmAsm
Raw Normal View History

1990-01-22 08:51:54 +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
1990-01-22 08:51:54 +00:00
add.l d0,(4,sp)
move.l #0x11,d0
trap #0
1993-11-24 12:54:29 +00:00
bcs lcerror
1990-01-22 15:03:13 +00:00
move.l (.limhp),d0
1990-01-22 08:51:54 +00:00
move.l d0,a0
1990-01-22 15:03:13 +00:00
move.l (4,sp),(.limhp)
1990-01-22 08:51:54 +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)
1990-01-22 08:51:54 +00:00
clr.l d0
rts