Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!apple!sun-barr!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga Subject: Re: Stack Message-ID: <117350@sun.Eng.Sun.COM> Date: 24 Jul 89 18:52:24 GMT References: <2105@hub.UUCP> Sender: news@sun.Eng.Sun.COM Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 22 In article <2105@hub.UUCP> dougp@voodoo.ucsb.edu writes: > Is there any particular reasor that no microprocessor has limit >registors for the stack? The 80286/386/486 all have a limit set for their stack segment. If you attempt to write outside of it in either direction it will generate an exception. The Motorola architectures don't include an on chip MMU (until the '030 came along) and since this is primarily an MMU question they left it up to the application to appropriately intialize the MMU. The Lattice compiler generates code to check for stack overflow before entering each function. However it does this by knowing how much stack the function you are calling is going to take. For DOS calls it has to guess, sometimes it guesses wrong. --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you. "A most excellent barbarian ... Genghis Kahn!"