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

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


Seems that I will need to patch VTIO to give me those keys.

I have found ReadBuf and V.EndPtr. If they are the same there is no
key. But they are in VTIO user space. :/

But then it won't work through DW terminal....duh!


On Thu, Mar 27, 2014 at 10:05 PM, Luis Antoniosi (CoCoDemus)
<retrocanada76 at gmail.com> wrote:
> 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



-- 
Long live the CoCo



More information about the Coco mailing list