ack/mach/m68k2/libsys/_brk.s

28 lines
404 B
ArmAsm
Raw Permalink Normal View History

1990-01-22 14:39:47 +00:00
.define __brk
1990-01-22 10:54:12 +00:00
.define __sbrk
.sect .text
.sect .rom
.sect .data
.sect .bss
1990-01-22 14:39:47 +00:00
.extern __brk
1990-01-22 10:54:12 +00:00
.extern __sbrk
.sect .text
1990-01-22 14:39:47 +00:00
__sbrk: move.l .limhp,a0
1990-01-22 10:54:12 +00:00
add.w 4(sp),a0
move.w #0x11,d0
trap #0
1990-01-22 14:39:47 +00:00
bcs Icerror
move.l .limhp,d0
1990-01-22 10:54:12 +00:00
move.l d0,a0
add.w 4(sp),a0
1990-01-22 14:39:47 +00:00
move.l a0,.limhp
1990-01-22 10:54:12 +00:00
rts
1990-01-22 14:39:47 +00:00
Icerror: jmp cerror
__brk: move.w #0x11,d0
1990-01-22 10:54:12 +00:00
move.l 4(sp),a0
trap #0
1990-01-22 14:39:47 +00:00
bcs Icerror
move.l 4(sp),.limhp
1990-01-22 10:54:12 +00:00
clr.l d0
rts