1987-01-29 22:10:18 +00:00
|
|
|
.define .strhp
|
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
1988-10-03 10:53:47 +00:00
|
|
|
EHEAP=17
|
1987-01-29 22:10:18 +00:00
|
|
|
|
|
|
|
.sect .text
|
|
|
|
.strhp:
|
|
|
|
move.l (sp)+, a0
|
|
|
|
move.l (sp), d1 ! new heap pointer
|
|
|
|
cmp.l (.limhp), d1 ! compare new heap pointer with limit
|
|
|
|
blt 1f
|
|
|
|
add.l #0x400, d1
|
|
|
|
and.l #~0x3ff, d1
|
1991-04-25 10:54:44 +00:00
|
|
|
move.l a0,-(sp)
|
1987-01-29 22:10:18 +00:00
|
|
|
move.l d1, -(sp)
|
1991-04-25 10:54:44 +00:00
|
|
|
move.l d1,(.limhp)
|
1992-06-30 15:22:07 +00:00
|
|
|
jsr (BRK) ! allocate 1K bytes of extra storage
|
1991-04-25 10:54:44 +00:00
|
|
|
add.l #4,sp
|
|
|
|
move.l (sp)+,a0
|
|
|
|
tst.l d0
|
|
|
|
bne 2f
|
1987-01-29 22:10:18 +00:00
|
|
|
1:
|
|
|
|
move.l (sp)+, (.reghp) ! store new value
|
|
|
|
jmp (a0) ! return
|
|
|
|
2:
|
|
|
|
move.l #EHEAP, -(sp)
|
1988-04-11 11:37:54 +00:00
|
|
|
jsr (.trp)
|
|
|
|
jmp (a0)
|
1987-01-29 22:10:18 +00:00
|
|
|
.align 2
|