[comp.sys.sequent] alloca

pen@lysator.liu.se (Peter Eriksson) (06/02/90)

I've written a small assembler version of the alloca() C function.
However, since this is my very first attempt at writing anything at
all i ns32k assembly, there might be bugs in the code. (It seems to
work though.)

Have anybody else written a version of this function (preferable with
argument validation and checks for stack overflow..)?

	.text
	.align	2
	.globl	_alloca
_alloca:
	movd tos,r1	
	adjspd 0(sp)	
	addr tos,r0
	addqd 4,r0
	movd r1,tos
	ret 0


Btw, are we the only ones using a Balance system today? (I know it's
supposed to be out of date and etc.., but we like it anyway.. :-)

Peter
--
Peter Eriksson                                              pen@lysator.liu.se
Lysator Computer Club                             ...!uunet!lysator.liu.se!pen
University of Linkoping, Sweden                               "Seize the day!"