Xref: utzoo comp.os.vms:33587 comp.lang.c:34783 rec.games.programmer:2698 Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!emory!gatech!uflorida!sparky.cis.ufl.edu!corwin From: corwin@sparky.cis.ufl.edu (Jack Rusher) Newsgroups: comp.os.vms,comp.lang.c,rec.games.programmer Subject: Re: VAX-C immediate char reading Keywords: VAX-C VMS i/o immediate Message-ID: <25930@uflorida.cis.ufl.EDU> Date: 15 Dec 90 00:18:49 GMT References: <1990Dec14.191104.7874@athena.mit.edu> <1990Dec14.195737.22164@nntp-server.caltech.edu> Sender: news@uflorida.cis.ufl.EDU Reply-To: corwin@sparky.cis.ufl.edu (Jack Rusher) Distribution: na Organization: U of Florida. Computer Science Dept. Lines: 33 The best way to perform the sort of I/O you have mentioned is to set up an $QIO call that specifies an AST handler to call when your routine gets input. As Per (excuse my pseudo-code): volatile char Ch; ProcessChar() { DoStuff(Ch); $QIO (IO$READVBLK, Channel, etc, Ch, etc, ProcessChar, etc); } main() { $QIO (IO$READVBLK, Channel, etc, Ch, etc, ProcessChar, etc); while (!done) do_non_player_stuff(); } Which will call "ProcessChar" when there is stuff to input, and will continue to execute in the meantime. Check out the docs for $QIO, $ASSIGN and the other stuff in the System Services section of the VMSHELP files for more information on exact syntax. If you do not grok what it has to say, do not dispair! There will soon be another solution to your problem. The GameLib project here at UF is producing an object library for just this sort of thing. -Jack Rusher, corwin@ufl.edu