From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fedc9afacc2ad9a1,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-02-01 06:11:06 PST Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!gatech!udel!news.mathworks.com!zombie.ncsc.mil!paladin.american.edu!auvm!PSAVAX.PWFL.COM!CONDIC Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU Newsgroups: comp.lang.ada Message-ID: Date: Wed, 1 Feb 1995 09:11:06 EST Sender: Ada programming language From: CONDIC@PSAVAX.PWFL.COM Subject: Re: Readkey in VAX Ada 83 Date: 1995-02-01T09:11:06-05:00 List-Id: From: Marin David Condic, 407.796.8997, M/S 731-93 Subject: Re: Readkey in VAX Ada 83 Original_To: PROFS%"SMTP@PWAGPDB" Original_cc: CONDIC > >I posted earlier about getting a character from the keyboard buffer but left >out a vital part... I'm using VAX Ada... I've had a few responses and one >person mentioned the file STARLET.... does anyone know if the answer lies in >here because the file is 2500 blocks long ... thanks.. e-mail me with response > I believe that the relavent STARLET call looks like this: STARLET.QIOW( STATUS => STATUS, EFN => INPUT_EFN, CHAN => INPUT_CHANNEL, FUNC => STARLET.IO_READVBLK, P1 => SYSTEM.TO_UNSIGNED_LONGWORD(KEY'address), P2 => 2); However, this is not the only answer for reading characters from the keyboard as they occur. STARLET is just one of the packages VAX Ada provides to give you the connections you want to system services. If you know how to get keystrokes through any variety of system calls, somewhere in the ACS Ada library you will find an interface to the system call. You will also want to investigate the SMG$ routines and I believe that there is a call known as SMG$READ_KEYSTROKE. (Try ACS EXTRACT SOURCE/SPECIFICATION_ONLY SMG to see the package spec for all the SMG calls.) Of course, the truly studly way of getting keystrokes is through the use of Asynchronous System Traps - you have to set up a mailbox and tie an AST to a task entry and all sorts of other delecate operations which will take you right down into the bowels of VMS. (Details left as an exercise for the student. It's not pretty!) This will allow you to react to keystrokes as independent events - but beware: it can be slow and is subject to application lockup due to buffer overflows. And then we could always ask the question: "When will compiler writers give me a TEXT_IO.GET_CHARACTER routine which behaves the way I want it to when connected to a keyboard?" But that might take all the glamour our of application programming ;-) Pax, Marin Marin David Condic, Senior Computer Engineer ATT: 407.796.8997 M/S 731-93 Technet: 796.8997 Pratt & Whitney, GESP Internet: CONDICMA@PWFL.COM P.O. Box 109600 Internet: MDCONDIC@AOL.COM West Palm Beach, FL 33410-9600 =============================================================================== "I have traveled the length and breadth of this country and talked with the best people, and I can assure you that data processing is a fad that won't last out the year." -- The editor in charge of business books for Prentice Hall, 1957. ===============================================================================