home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!stanford.edu!ames!elroy.jpl.nasa.gov!jato!jdickson
- From: jdickson@jato.jpl.nasa.gov (Jeff Dickson)
- Subject: Re: console device raw mode
- Message-ID: <1992Aug14.180224.2182@jato.jpl.nasa.gov>
- Organization: Jet Propulsion Laboratory
- References: <DEREKN.92Aug12113036@vw.ece.cmu.edu> <NIX.92Aug14014127@zombie.oulu.fi> <1992Aug14.114648.9446@syma.sussex.ac.uk>
- Distribution: comp
- Date: Fri, 14 Aug 1992 18:02:24 GMT
- Lines: 52
-
- In article <1992Aug14.114648.9446@syma.sussex.ac.uk> mpue2@syma.sussex.ac.uk (James E. Talbut) writes:
- >In article <NIX.92Aug14014127@zombie.oulu.fi>, nix@zombie.oulu.fi (Tero Manninen) writes:
- >> On Thu, 13 Aug 1992 12:39:36 GMT, ry41@rz.uni-karlsruhe.de (Bernhard Moellemann) said:
- >> Bernhard> Just call DoPkt(conport,ACTION_SCREEN_MODE,DOSTRUE) to enable RAW-mode and
- >> Bernhard> use DoPkt(...,DOSFALSE) to go back to cooked output.
- >> There is even siplier way to do it:
- >> fh = Open("CON:....", ...);
- >> SetMode(fh, 1); (1 is raw, 0 is cooked or normal line buffered mode).
- >
- >These are both useful (assuming they work, I haven't got onto my Ami' in
- >the last few days!)
- >But wasn't the original question about how to read from a RAW with
- >dos.library commands?
- >If not, it must have been another post, but how do I do it?
- >Whenever I try to read from a RAW: it hangs.
- >
- > J.T.
- >
- >--
- >Fine beer may be judged with just one sip,
- > but it's better to be thoroughly sure. - Czech proverb
- >
- >James Talbut mpue2@syma.susx.ac.uk
-
-
- Yes, the original question was about how to read from a RAW with dos.library.
-
- The reason Read() hangs, is because it will block until the number of char-
- acters you specified to be read are read! There's no way to judge how many
- characters may have been input, because unlike some of the other devices (i.e.
- serial device) a kind of QUERY command (i.e. SCMD_QUERY) is not supported.
-
- One way to escape all this is to abandon the dos.library altogether and use
- the IO Request mechanisms instead. At least this way you could post an asyn-
- chronous read for one character (i.e. SendIO) and get signaled when the read
- completed.
-
- jeff
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-