🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #37733

Re: May I overwrite basepage

#37733
From: Allan Pratt
Date: Tue, 04 Apr 1989 19:45
29 lines
1956 bytes
In article <766@stag.UUCP> to_stdnet@stag.UUCP writes:
> From: BROOKS%csss-a.prime.com@RELAY.CS.NET
> 
> Sometimes I write very small stay-resident programs and, instead of
> allocating 2K of bss for an stack (and then only using 250 bytes) I set
> up the stack to overrun my startup code and wander down into the
> basepage.
> 
> Does anyone know: Will this cause any problems?  Does TOS need anything
> in the basepage one I've started executing -- providing I don't Pexec
> anything?  Of course, I'd better not go *below* the basepage...

You'd better not go INTO your basepage, at least not past your command
line (which starts at offset $80 in your basepage).  GEMDOS needs to use
the basepage (not surprisingly), so you can't make any GEMDOS calls
after you clobber your basepage.  The GEMDOS call Ptermres, which you
obviously are using, definitely needs stuff in your basepage, like your
parent's basepage address so it can restart your parent.  You can
clobber your own command line area and the part of the TPA beyond that,
but leave the rest of your basepage alone. 

Do NOT take the example I gave above and think, "Oh, if I preserve the
parent's basepage value in my basepage, I can use the rest of it." It is
intended as an example, not an exhaustive list, of what GEMDOS needs
from your basepage. 

============================================
Opinions expressed above do not necessarily	-- Allan Pratt, Atari Corp.
reflect those of Atari Corp. or anyone else.	  ...ames!atari!apratt
Technical Details
Message-ID: <1430@atari.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!ames!amdcad!sun!imagen!atari!apratt
References: <766@stag.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!ames!amdcad!sun!imagen!atari!apratt
From: apratt@atari.UUCP (Allan Pratt)
Newsgroups: comp.sys.atari.st
Subject: Re: May I overwrite basepage
Message-ID: <1430@atari.UUCP>
Date: 4 Apr 89 19:45:19 GMT
References: <766@stag.UUCP>
Reply-To: apratt@atari.UUCP (Allan Pratt)
Organization: Atari (US) Corporation, Sunnyvale, California
Lines: 29