Path: 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 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!"