[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: >Craig Caroon, ORCA/C, while [no keypress]



jmk3@crux1.cit.cornell.edu (Jay M. Krell) writes:

>Craig,
>  I don't know if any C library routine waits for a keypress the way
>you want it to, but there are a number of ways to do this yourself.
>One icky way to read a byte from $E0C000 until the value is negative.
>If you are using the Event Manager, you could call GetNextEvent
>or EventAvail in a loop until a keypress event is returned.
> 
>Mike includes a Pascal example of reading the keyboard directly
>in the Calendar.cda. I don't know (yet) if it comes with C. The
>Pascal version is bad because it accesses two bytes. You must only
>access one byte when accessing I/O memory.

  No-wait mode in the GS/OS console driver does what you want, Craig.
GNO/ME also has extensive facilities for fine control of the
console.

 
-- 
 Jawaid Bazyar              |   Ask me about the GNO Multitasking Environment
 Procyon, Inc.              |   for the Apple IIgs!   
 bazyar@cs.uiuc.edu         |   P.O Box 620334
 --Apple II Forever!--      |   Littleton, CO 80162-0334   (303) 933-4649