Article View: comp.sys.amiga.tech
Article #11014Re: Non-blocking keyboard reads
From: Randell Jesup
Date: Wed, 18 Jan 1989 04:28
Date: Wed, 18 Jan 1989 04:28
15 lines
1311 bytes
1311 bytes
In article <1004@husc6.harvard.edu> wen@husc4.UUCP (A. Wen) writes:
>I've been mulling over ways to do non-blocking keyboard reads without
>polling the keyboard; is there any way that I can be signalled when the
>console device has input available short of creating a new task to block
>for input and then signal its parent process?
Well, if you want the console.device (as opposed to RAWKEYS or
VANILLAKEYS), a seperate task is probably the way to go. The only other
way is to do asynch io, and use the signal bit of the replyport to know when
a read has completed. (Use SendIO or BeginIO, then when you get the signal,
check the message with CheckIO, and if it completed use WaitIO (which will
remove it from the port) or GetMsg(port) if no other messages use that port).
--
Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup
Technical Details
Message-ID:
<5716@cbmvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!csd4.milw.wisc.edu!nic.MR.NET!umn-d-ub!rutgers!cbmvax!jesupReferences:
<1004@husc6.harvard.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!csd4.milw.wisc.edu!nic.MR.NET!umn-d-ub!rutgers!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.sys.amiga.tech Subject: Re: Non-blocking keyboard reads Message-ID: <5716@cbmvax.UUCP> Date: 18 Jan 89 04:28:46 GMT References: <1004@husc6.harvard.edu> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Organization: Commodore Technology, West Chester, PA Lines: 15