home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / msdos / programm / 9280 < prev    next >
Encoding:
Text File  |  1992-09-11  |  1.5 KB  |  46 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!drivax!frotz
  3. From: frotz@dri.com (Frotz)
  4. Subject: Re: Serial Port Setup
  5. Message-ID: <TQBQBYS4@dri.com>
  6. Keywords: serial input output setup
  7. Sender: frotz@novell.com
  8. Reply-To: frotz@novell.com
  9. Organization: Desktop Systems Group/Novell, Monterey CA/USA
  10. References: <1992Aug26.202240.1342@cs.ubc.ca>
  11. Date: Fri, 11 Sep 92 17:49:24 GMT
  12. Lines: 32
  13.  
  14. davidson@cs.ubc.ca (Mark Davidson) writes:
  15.  
  16.  
  17. ]I'm writing an software interface for a PS/2 model 90 to communicate
  18. ]with a Sony videodisc recorder (LVR-5000) and I'm having problems
  19. ]setting up the serial port. I looked at the FAQ BTW,
  20.  
  21. ]I've defined the name and the settings of the port in the following
  22. ]macro
  23.  
  24. ]#define DEFAULT_PORT "COM1: 9600, N, 8, 1"
  25.  
  26. ]setup_tty(char *dev_name)
  27. ]{
  28. ]   int ofile_d;
  29. ]   if (!( ofile = fopen(dev_name, "w"))) { 
  30.  
  31. You can't open a device named "COM1: 9600,N,8,1" (or any combination
  32. of this).  You can only open "COM1:".  If you want to set the baud
  33. rate, you might pass this DEFAULT_PORT string through a system() call
  34. to invoke MODE.COM, but that's slow and ugly.
  35.  
  36. The better solution is to get Ralf Brown's Interrupt List, and look at
  37. the INT14 BIOS calls to set the baudrate. 
  38.  
  39. --
  40. John "Frotz" Fa'atuai    frotz@novell.com        (email@domain)
  41. Desktop Systems        uunet!novell.com!frotz        (bang address)
  42.   Group/Novell        NOVELL:FROTZ  or  FROTZ@NOVELL    (MHS address)
  43. c/o TS Dept.        408/645-2067            (vmail)
  44. 80 Garden Court        408/649-8209            (fax)
  45. Monterey, CA  93940
  46.