Added strhp.s

This commit is contained in:
ceriel 1990-01-22 16:25:52 +00:00
parent 86501edf9e
commit a42999afab
2 changed files with 26 additions and 0 deletions

View file

@ -24,3 +24,4 @@ print.s
prstr.s
prnl.s
putchar.s
strhp.s

25
mach/ns/libem/strhp.s Normal file
View file

@ -0,0 +1,25 @@
#include "em_abs.h"
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
.define .strhp
! $Header$
.strhp:
movd tos,r7
movd tos,r0
movd r7,tos
movd r0,@.reghp
cmpd r0,@.limhp
blo I2
addd 02000,r0
bicd 0777,r0
movd r0,tos
jsr @_brk
adjspd -4
cmpqd 0,r0
beq I2
movd EHEAP,tos
jsr @.trp
I2:
ret 0