home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / amiga / programm / 12316 < prev    next >
Encoding:
Text File  |  1992-08-14  |  2.1 KB  |  64 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!stanford.edu!ames!elroy.jpl.nasa.gov!jato!jdickson
  3. From: jdickson@jato.jpl.nasa.gov (Jeff Dickson)
  4. Subject: Re: console device raw mode
  5. Message-ID: <1992Aug14.180224.2182@jato.jpl.nasa.gov>
  6. Organization: Jet Propulsion Laboratory
  7. References: <DEREKN.92Aug12113036@vw.ece.cmu.edu> <NIX.92Aug14014127@zombie.oulu.fi> <1992Aug14.114648.9446@syma.sussex.ac.uk>
  8. Distribution: comp
  9. Date: Fri, 14 Aug 1992 18:02:24 GMT
  10. Lines: 52
  11.  
  12. In article <1992Aug14.114648.9446@syma.sussex.ac.uk> mpue2@syma.sussex.ac.uk (James E. Talbut) writes:
  13. >In article <NIX.92Aug14014127@zombie.oulu.fi>, nix@zombie.oulu.fi (Tero Manninen) writes:
  14. >> On Thu, 13 Aug 1992 12:39:36 GMT, ry41@rz.uni-karlsruhe.de (Bernhard Moellemann) said:
  15. >> Bernhard> Just call DoPkt(conport,ACTION_SCREEN_MODE,DOSTRUE) to enable RAW-mode and
  16. >> Bernhard> use DoPkt(...,DOSFALSE) to go back to cooked output.
  17. >> There is even siplier way to do it:
  18. >> fh = Open("CON:....", ...);
  19. >> SetMode(fh, 1);   (1 is raw, 0 is cooked or normal line buffered mode).
  20. >
  21. >These are both useful (assuming they work, I haven't got onto my Ami' in
  22. >the last few days!)
  23. >But wasn't the original question about how to read from a RAW with
  24. >dos.library commands?
  25. >If not, it must have been another post, but how do I do it?
  26. >Whenever I try to read from a RAW: it hangs.
  27. >
  28. >    J.T.
  29. >
  30. >-- 
  31. >Fine beer may be judged with just one sip,
  32. >    but it's better to be thoroughly sure.  -  Czech proverb
  33. >
  34. >James Talbut            mpue2@syma.susx.ac.uk
  35.  
  36.  
  37. Yes, the original question was about how to read from a RAW with dos.library.
  38.  
  39. The reason Read() hangs, is because it will block until the number of char-
  40. acters you specified to be read are read! There's no way to judge how many
  41. characters may have been input, because unlike some of the other devices (i.e.
  42. serial device) a kind of QUERY command (i.e. SCMD_QUERY) is not supported.
  43.  
  44. One way to escape all this is to abandon the dos.library altogether and use
  45. the IO Request mechanisms instead. At least this way you could post an asyn-
  46. chronous read for one character (i.e. SendIO) and get signaled when the read
  47. completed. 
  48.  
  49. jeff
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.