Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!ut-sally!husc6!harvard!spdcc!m2c!applix!scott From: scott@applix.UUCP (Scott Evernden) Newsgroups: comp.sys.amiga Subject: SetExcept() & exception code Message-ID: <545@applix.UUCP> Date: Mon, 13-Jul-87 10:46:16 EDT Article-I.D.: applix.545 Posted: Mon Jul 13 10:46:16 1987 Date-Received: Tue, 14-Jul-87 03:41:28 EDT Reply-To: scott@applix.UUCP (Scott Evernden) Distribution: world Organization: APPLiX Inc., Westboro MA Lines: 34 Can anyone help me? I am trying to use SetExcept() to capture some keyboard signals. I would like to know what, if any, are the problems associated with longjmp()'ing out of the exception handling code. Is this legal? Should it work? Don't groan too loudly. Not feeling real cool messing in gross ways with my stack, I normally try to avoid set/longjmp(). I myself wouldn't try to do this sort of thing. But the CM/LSRHS LOGO recently posted to comp.sources.unix, which I've ported to the Amiga, does. I have tried doing this longjmp() trick, and things actually seem to proceed OK - for a while. DOS calls even seem to work. I'm having some difficulty locating the exact point of failure (the machine completely locks up), but it looks like somewhere in the kernel Read() routine (for next user input). I've noticed, however, while using the MANX DB debugger, that the IDNestCnt of my task seems to go up and never come down. Is this a characteristic of the debugger, or what I am attempting to do? Should I be concerned about this? If I can longjmp(), can I call SetExcept() again? Or should/can I adjust the Task's tc_SigExcept directly? Are there other things about SetExcept() or the associated Task structure fields I should know? For example, I've discovered that it's quite important to record and restore the original contents of the tc_ExceptCode/Data fields (now it seems obvious), as well as the original tc_SigExcept mask. thanks -scott