Use .limhp

This commit is contained in:
ceriel 1990-01-22 14:08:16 +00:00
parent ee026dd2ab
commit 786665c582
3 changed files with 15 additions and 19 deletions

View file

@ -1,28 +1,25 @@
#include "syscall.h" #include "syscall.h"
DEFINE(__brk) DEFINE(__brk)
cmpl 4(ap),Imin cmpl 4(ap),$endbss
bgeq Iok bgeq Iok
movl Imin,4(ap) movl $endbss,4(ap)
Iok: Iok:
chmk $17 chmk $17
bcs Ierr bcs Ierr
movl 4(ap),Icur movl 4(ap),.limhp
clrl r0 clrl r0
ret ret
Ierr: Ierr:
jmp cerror jmp cerror
DEFINE(__sbrk) DEFINE(__sbrk)
addl3 Icur,4(ap),-(sp) addl3 .limhp,4(ap),-(sp)
bcs Ierr bcs Ierr
pushl $1 pushl $1
movl ap,r3 movl ap,r3
movl sp,ap movl sp,ap
chmk $17 chmk $17
bcs Ierr bcs Ierr
movl Icur,r0 movl .limhp,r0
addl2 4(r3),Icur addl2 4(r3),.limhp
ret ret
.sect .data
Imin: .data4 endbss
Icur: .data4 endbss

View file

@ -1,29 +1,25 @@
#include "syscall.h" #include "syscall.h"
.extern _end
DEFINE(_brk) DEFINE(_brk)
cmpl 4(ap),Imin cmpl 4(ap),$endbss
bgeq Iok bgeq Iok
movl Imin,4(ap) movl $endbss,4(ap)
Iok: Iok:
chmk $17 chmk $17
bcs Ierr bcs Ierr
movl 4(ap),Icur movl 4(ap),.limhp
clrl r0 clrl r0
ret ret
Ierr: Ierr:
jmp cerror jmp cerror
DEFINE(_sbrk) DEFINE(_sbrk)
addl3 Icur,4(ap),-(sp) addl3 .limhp,4(ap),-(sp)
bcs Ierr bcs Ierr
pushl $1 pushl $1
movl ap,r3 movl ap,r3
movl sp,ap movl sp,ap
chmk $17 chmk $17
bcs Ierr bcs Ierr
movl Icur,r0 movl .limhp,r0
addl2 4(r3),Icur addl2 4(r3),.limhp
ret ret
.sect .data
Imin: .data4 _end
Icur: .data4 _end

View file

@ -6,6 +6,7 @@
.sect .text .sect .text
.define hol0 .define hol0
.define .reghp .define .reghp
.define .limhp
.define .trppc .define .trppc
.define .trpim .define .trpim
@ -84,6 +85,8 @@ Im2:
.data4 0 .data4 0
.reghp: .reghp:
.data4 _end .data4 _end
.limhp:
.data4 _end
hol0: hol0:
.space 8 .space 8
.trppc: .trppc: