[ From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 28-JUL-1990 02:58:35.78  To:	MRGATE::"ARISIA::EVERHART" CC:	4 Subj:	Re: BACKUP and control-T: how does it do that?  * Received:  by crdgw1.ge.com (5.57/GE 1.70)) 	 id AA04776; Sat, 28 Jul 90 02:37:48 EDT V Received: From CCIT.ARIZONA.EDU by CRVAX.SRI.COM with TCP; Fri, 27 JUL 90 20:11:37 PDT Date: Fri, 27 Jul 90 20:06 MST From: KAPLAN@ccit.arizona.edu 7 Subject: Re: BACKUP and control-T: how does it do that?  To: INFO-VAX@KL.SRI.COM 1 Message-Id: <5AFB9453483F20544E@ccit.arizona.edu> " X-Envelope-To: INFO-VAX@KL.SRI.COM" X-Vms-To: IN%"INFO-VAX@KL.SRI.COM" X-Vms-Cc: KAPLAN  G >I've been wondering lately just how BACKUP manages to spit out several * >lines of info when you enter control-T.    C Yes, and once you find out how it works, you can just "imagine the   possibilities"! Qute stuff.    >I could imagine, for example,K >that it simply issues an AST-driven single-character read to the keyboard, B >in "transparent" mode so VMS won't interpret it.  Is this what itJ >actually does, or is there some obscure system service with which one can8 >snatch control-T, like what can be done with control-C?  K No, and yes!  In the I/O User's Manual - PART I (that's PROGRAMMING manual  N set, volume number 7A of the "full VAX/VMS manual set), you'll find some very G interesting reading starting on page 8-47 under the heading of "Enable  K Out-of-Band AST Function Modifier".  There are 32 "special" characters that H the terminal driver can treat specially for you (a la the Church Lady onK Saturday Night Live?.  I guess that they are called "out of band" since the N normal "bandwidth" of keystrokes does not usually contain them (i.e.: control  characters and the like).     H At any rate, you can dispatch control to any code that you would like byD asking the terminal triver to queue an AST for your process when theC "out-of-band" character of your choice is typed.  This is done with N IO$_SETMODE and IO$M_OUTBAND function modifiers for your friendly neighborhoodD QIO.  The manual actually has a nice programming example to follow.   F Many, many possibilities here!  I've seen people build everything fromN performance monitors (i.e.: "show me what locks I hold" to security-breachers I (i.e. "I'm ready to have inner-mode access now, please") out of this nice 1 facility. Please tell us what you build with it.     Happy hacking!  
 	Ray 8-|)}  % Ray Kaplan - I know what I don't know O W) Computer Center - University of Arizona - Tucson, AZ, 85751 - (602) 621-2857 ; H) P.O. Box 32647 - Tucson, Arizona  85751 - (602) 323-4606  BITNET:    KAPLAN@ARIZRVAX  ' INTERNET:  KAPLAN@RVAX.CCIT.ARIZONA.EDU N ------------------------------------------------------------------------------N >> THESE ARE MY VIEWS.  They do not necessarily reflect those of others ... >>N ------------------------------------------------------------------------------  