🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #718

Re: software "exceptions"

#718
From: Randell Jesup
Date: Fri, 04 Aug 1989 18:26
33 lines
2096 bytes
In article <148@ckctpa.UUCP> crash@ckctpa.UUCP (Frank J. Edwards) writes:
>In article <7526@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes:
>>	Oh yes, standard disclaimer: you can't assume that your program
>>isn't in a ROM routine with resources locked, so you can't safely change
>>the PC of the program (unless you're 101% certain it can't have anything
>>locked).
>
>Good point.  AmigaDOS isn't re-entrant, is it?

	Sure it is, but you can't change the PC of the program safely in most
cases, since some of the 'state' (what's locked, etc) is dependent on what
the PC is (i.e. if you hijack the PC while it's between a LockIBase() and
an UnLockIBase(), IBase is locked forever).

>I had hoped, at least in the case of CLOSEWINDOW, that since my handler
>ran in user-mode it could take care of task cleanup (memory allocations,
>windows, screens, etc) and then call exit().  But exit() calls Close()
>and probably other DOS/Exec routines so that's not safe.

	The other thing to remember is that exceptions have (I think) and
interrupt-like context - no memory allocation, etc.

>Hmmm.  Sounds like no matter what I do, I'm required to set a flag and
>process it in the normal execution of the program.  Which means I'm back
>to polling a flag variable somewhere ... might as well be tc_SigRecvd.

	Yup.  Exceptions are a kind-of nice idea that didn't really end
up being very useful.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"
Technical Details
Message-ID: <7540@cbmvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!usc!apple!oliveb!amiga!cbmvax!jesup
References: <7526@cbmvax.UUCP> <143@ckctpa.UUCP> <148@ckctpa.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!usc!apple!oliveb!amiga!cbmvax!jesup
From: jesup@cbmvax.UUCP (Randell Jesup)
Newsgroups: comp.sys.amiga.tech
Subject: Re: software "exceptions"
Message-ID: <7540@cbmvax.UUCP>
Date: 4 Aug 89 18:26:13 GMT
References: <7526@cbmvax.UUCP> <143@ckctpa.UUCP> <148@ckctpa.UUCP>
Reply-To: jesup@cbmvax.UUCP (Randell Jesup)
Organization: Commodore Technology, West Chester, PA
Lines: 33