🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sequent
Article #247

alloca() for the ns32k

#247
From: Peter Eriksson
Date: Sat, 02 Jun 1990 15:42
29 lines
1317 bytes
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!"
Technical Details
Message-ID: <63@lysator.liu.se>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!snorkelwacker!bloom-beacon!eru!luth!sunic!liuida!isy!lysator.liu.se!pen

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!snorkelwacker!bloom-beacon!eru!luth!sunic!liuida!isy!lysator.liu.se!pen
From: pen@lysator.liu.se (Peter Eriksson)
Newsgroups: comp.sys.sequent
Subject: alloca() for the ns32k
Message-ID: <63@lysator.liu.se>
Date: 2 Jun 90 15:42:34 GMT
Sender: news@isy.liu.se (Lord of the News)
Distribution: comp
Organization: Lysator Computer Club, Linkoping University, Sweden
Lines: 29