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

Bill Pierce ooogalapasooo at aol.com
Fri Mar 28 18:51:14 EDT 2014


Luis,
Thee's a getstat call to see if a key has been pressed, but it doesn't return the key and it doesn't advance the buffer pointer.
LDA #path (stdin=0)
LDB #1 (gs code)
os9 getstt

then b=0 if key, b= -1 if no key

There should also be a way to return an address of the scf buffer through getstat as well, then you could use a semi-illegal read to see what's there without patching anything.
Check the SCF getstat calls in the tech ref manual for the codes to get the buffer address. I don't think these existed in original OS9 (maybe they did). but I know they're in nitros9. Also, list the o9defs & scfdefs which have been reduculously renamed to os9.d & scf.d.... WHY? I don't know, but I do know that you can't assemble legacy sources with nitros9 because someone thought you needed to rename the defs. And if you rename them, then you get errors because upper/lower case errors where the case of all the defs has been changed as well.
To me, this was a counter-productive move in nitros9. Now you have to "edit" the defs or "edit' the sources before you can assemble any old program. Or just use the old defs, which don't have the newer calls and definitions.


Bill Pierce
"Today is a good day... I woke up" - Ritchie Havens
 

My Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Co-Webmaster of The TRS-80 Color Computer Archive
http://www.colorcomputerarchive.com/
Co-Contributor, Co-Editor for CocoPedia
http://www.cocopedia.com/wiki/index.php/Main_Page
E-Mail: ooogalapasooo at aol.com




-----Original Message-----
From: Luis Antoniosi (CoCoDemus) <retrocanada76 at gmail.com>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Sent: Fri, Mar 28, 2014 3:47 pm
Subject: Re: [Coco] OS-9 How to sense any key ?


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

--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco

 



More information about the Coco mailing list