1985-02-07 22:06:32 +00:00
|
|
|
.define .strhp
|
1986-07-22 13:37:16 +00:00
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
1985-02-07 22:06:32 +00:00
|
|
|
|
1986-07-22 13:37:16 +00:00
|
|
|
.sect .text
|
1985-02-07 22:06:32 +00:00
|
|
|
.strhp:
|
1987-03-27 10:05:53 +00:00
|
|
|
move.l 4(sp), d1 ! new heap pointer
|
|
|
|
cmp.l .limhp, d1
|
1985-02-07 22:06:32 +00:00
|
|
|
blt 1f
|
1987-03-27 10:05:53 +00:00
|
|
|
add.l #0x400, d1
|
|
|
|
and.l #~0x3ff, d1
|
|
|
|
move.l d1, -(sp)
|
1991-04-25 10:49:28 +00:00
|
|
|
move.l d1,.limhp
|
1987-03-27 10:05:53 +00:00
|
|
|
jsr _brk ! allocate 1K bytes of extra storage
|
|
|
|
add.l #4, sp
|
1991-04-25 10:49:28 +00:00
|
|
|
tst.l d0
|
|
|
|
bne 2f
|
1985-02-07 22:06:32 +00:00
|
|
|
1:
|
1987-03-27 10:05:53 +00:00
|
|
|
move.l 4(sp), .reghp ! store new value of heap pointer
|
|
|
|
move.l (sp)+,a0
|
|
|
|
move.l a0,(sp)
|
|
|
|
rts
|
1985-02-07 22:06:32 +00:00
|
|
|
2:
|
1987-03-27 10:05:53 +00:00
|
|
|
move.l #EHEAP, -(sp)
|
1988-04-11 11:27:37 +00:00
|
|
|
jsr .trp
|
|
|
|
move.l (sp)+,a0
|
|
|
|
move.l a0,(sp)
|
|
|
|
rts
|
1985-02-07 22:06:32 +00:00
|
|
|
.align 2
|