26 lines
378 B
ArmAsm
26 lines
378 B
ArmAsm
.define _brk
|
|
.define _sbrk
|
|
.extern _brk
|
|
.extern _sbrk
|
|
.sect .text
|
|
.sect .rom
|
|
.sect .data
|
|
.sect .bss
|
|
.sect .text
|
|
_sbrk: move.l (.reghp),d0
|
|
add.l d0,(4,sp)
|
|
move.l #0x11,d0
|
|
trap #0
|
|
bcs lcerror
|
|
move.l (.reghp),d0
|
|
move.l d0,a0
|
|
move.l (4,sp),(.reghp)
|
|
rts
|
|
lcerror: jmp (cerror)
|
|
_brk: move.l #0x11,d0
|
|
trap #0
|
|
bcs lcerror
|
|
move.l (4,sp),(.reghp)
|
|
clr.l d0
|
|
rts
|