Path: utzoo!attcan!uunet!husc6!mailrus!uflorida!gatech!udel!mmdf From: iphwk%MTSUNIX1.BITNET@cunyvm.cuny.edu (Bill Kinnersley) Newsgroups: comp.sys.amiga Subject: Re: Re: Recognizing the break character Message-ID: <3498@louie.udel.EDU> Date: 26 Jul 88 20:14:25 GMT Sender: mmdf@udel.EDU Lines: 39 [In "Re: Recognizing the break character?", Wayne Young said:] > > If you look around in some of the earlier Fish disks, you'll find a little > gem that Fred wrote himself. It's a cc command for Lattice, and it comes > with sources. There's some code in it which checks for ^C, and you can > easily extract the necessary stuff to make your own check_abort() routine. > -- > {uunet,utzoo,decvax,allegra}!utcsri!utflis!wayne > Cc is on Fish Disks #2, 29 and 43. I have #29, and what Fred is doing is calling the Aztec Chk_Abort() function. According to the manual, Chk_Abort(): "aborts the program if (1) ^C has been typed and (2) the global short Enable_Abort is non-zero (which it is by default). If either of these conditions isn't satisfied, Chk_Abort() simply returns." Fred is using an undocumented (or underdocumented) feature, namely WHAT it returns. Chk_Abort() returns the result of SetSignal(0L,0x1000L), which can be used as a Boolean to poll for ^C. All this is related to the question I had about using an Exception Handler to simulate a Unix signal catch. I'd still like to see a solution that does not involve polling (although I can see that polling is what you want in some cases). The problem is that the semantics are different. A caught Unix signal causes a longjmp, whereas an Amiga Exception is a rather special form of subroutine call, and must return to the OS. -- Bill Kinnersley Physics Department BITNET: iphwk@mtsunix1 Montana State University INTERNET: iphwk%mtsunix1.bitnet@cunyvm.cuny.edu Bozeman, MT 59717 CSNET: iphwk%mtsunix1.bitnet@relay.cs.net (406)994-3614 UUCP: ...psuvax1!mtsunix1.bitnet!iphwk "He learned to communicate with birds and discovered that their conversation was fantastically boring. It was all to do with wind speed, wingspan, power-to-weight ratios and a fair bit about berries."