Franks version

This commit is contained in:
ceriel 1987-03-27 10:05:53 +00:00
parent 0cc30a7e49
commit 129343dc94

View file

@ -6,19 +6,22 @@
.sect .text .sect .text
.strhp: .strhp:
move.l (sp)+,a0 move.l 4(sp), d1 ! new heap pointer
move.l (sp)+,d0 ! heap pointer cmp.l .limhp, d1
move.l d0,.reghp
cmp.l .limhp,d0
blt 1f blt 1f
add.l #0x400,d0 add.l #0x400, d1
and.l #~0x3ff,d0 and.l #~0x3ff, d1
move.l d0,.limhp move.l d1, .limhp
cmp.l d0,sp move.l d1, -(sp)
ble 2f jsr _brk ! allocate 1K bytes of extra storage
add.l #4, sp
bcs 2f
1: 1:
jmp (a0) move.l 4(sp), .reghp ! store new value of heap pointer
move.l (sp)+,a0
move.l a0,(sp)
rts
2: 2:
move.w #EHEAP,-(sp) move.l #EHEAP, -(sp)
jmp .fat jmp .fatal
.align 2 .align 2