Path: utzoo!mnetor!uunet!portal!atari!apratt From: apratt@atari.UUCP (Allan Pratt) Newsgroups: comp.sys.atari.st Subject: Re: C and autostarting GEM programs Message-ID: <971@atari.UUCP> Date: 4 Feb 88 22:38:36 GMT References: <1988Feb3.080736.14303@mntgfx.mentor.com> Organization: Atari Corp., Sunnyvale CA Lines: 30 in article <1988Feb3.080736.14303@mntgfx.mentor.com>, dclemans@mntgfx.mentor.com (Dave Clemans) says: > Re: Control C > GEMDOS doesn't directly terminate a process when it sees a Control-C character > in a "cooked" input function; instead it calls a special pseudo-interrupt > vector called the critical exception handler. The default code for that > handler is what terminates the process. If you install a replacement for it > you can do whatever you want. If I remember correctly this is described > in the Atari GEMDOS Users Guide manual. Not exactly. First, GEMDOS calls the "terminate vector" not the "critical exception handler." Second, that vector points by default an RTS instruction. It is the code after the call which terminates the process. This vector gets called when you use Pterm(), too: it's not strictly a "control C" handler. You can avoid being terminated by doing a "setjmp(term_buf)" where you want to recover, and setting this vector to point to something like "longjmp(term_buf,1)" Unfortunately, there isn't a lot of documentation on this, and other projects prevent me from going into more detail. ============================================ Opinions expressed above do not necessarily -- Allan Pratt, Atari Corp. reflect those of Atari Corp. or anyone else. ...ames!atari!apratt