[Coco] OS-9 How to sense any key ?

Luis Antoniosi (CoCoDemus) retrocanada76 at gmail.com
Fri Mar 28 15:53:43 EDT 2014


The "press any key to continue" is a LIE. You cannot press the
hibernate or power-off key...


On Thu, Mar 27, 2014 at 11:24 PM, Kip Koon <computerdoc at sc.rr.com> wrote:
> Hi Luis!
> I have had people tell me that they can't find the any key!  :)  For real!
> I've had to tell them the any key does not exist so I would have to say that
> it is impossible to sense the any key!  :)  I thought that might amuse you!
> :)
> Kip
>
> -----Original Message-----
> From: coco-bounces at maltedmedia.com [mailto:coco-bounces at maltedmedia.com] On
> Behalf Of Luis Antoniosi (CoCoDemus)
> Sent: Thursday, March 27, 2014 10:06 PM
> To: CoCoList for Color Computer Enthusiasts
> Subject: [Coco] OS-9 How to sense any key ?
>
> I checked the KeySns GetStt but it seems to sense only control + cursor
> keys.
>
> On cp/m i need to do:
>
> * sense if there is any key pressed
> * get the key without removing it from the queue
>
> this is the function I need to repdroduce. DbaseII uses that:
>
> BDOS function 6 (C_RAWIO) - Direct console I/O
>
> Supported by: CP/M 1.4 and later, with variations
>
> Entered with C=6, E=code. Returned values (in A) vary.
>
> E=0FFhReturn a character without echoing if one is waiting; zero if
> none is available. In MP/M 1, this works like E=0FDh below and waits
> for a character.E=0FEh[CP/M3, NovaDOS, Z80DOS, DOS+] Return console
> input status. Zero if no character is waiting, nonzero
> otherwise.E=0FDh[CP/M3, DOS+] Wait until a character is ready, return
> it without echoing.E=0FCh[DOS+] One-character lookahead - return the
> next character waiting but leave it in the buffer.
>
> Values of E not supported on a particular system will output the
> character. Under CP/M 2 and lower, direct console functions may
> interact undesirably with non-direct ones, since certain buffers may
> be bypassed. Do not mix them.
>
>
> --
> Long live the CoCo
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco



-- 
Long live the CoCo



More information about the Coco mailing list