Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!mailrus!purdue!decwrl!ucbvax!kepler.Berkeley.EDU!me142-an From: me142-an@kepler.Berkeley.EDU (sp88 class acct) Newsgroups: comp.sys.amiga Subject: Re: Recognizing the break character Message-ID: <25251@ucbvax.BERKELEY.EDU> Date: 27 Jul 88 07:15:41 GMT References: <3498@louie.udel.EDU> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: me142-an@kepler.Berkeley.EDU (sp88 class acct) Organization: University of California, Berkeley Lines: 20 The ^C is very easy to detect. You must look in tc_sigrecvd to find a sigbreakf_ctrl_c. The following code does this move.l 4,a6 ; execbase move.l thistask(a6),a0 ; my task structure move.l tc_sigrecvd(a0),d0 ;signals we have received andi.l #sigbeakf_ctrl_c,d0 ; the ^c flags bne userdidhit^c ; a one bit in tc_sigrecvd means we were signaled whatever you were doing..... if you want to actually wait for a ^c, do move.l 4,a6 move.l #sigbreakf_ctrl_c,d0 jsr _LVOWait(a6) etc,etc,etc.... (note that my upper case/lower case in the symbols is frequently not what Commodore/Amiga intended. Mixed case in symbols is disgusting!)