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

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



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.
 
Jay
jay.krell@cornell.edu