home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / alt / msdos / programm / 3056 < prev    next >
Encoding:
Internet Message Format  |  1992-12-31  |  1.8 KB

  1. Xref: sparky alt.msdos.programmer:3056 comp.os.msdos.programmer:11717 comp.sys.ibm.pc.programmer:713 comp.lang.c++:18595 comp.lang.c:19073
  2. Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c
  3. Path: sparky!uunet!paladin.american.edu!darwin.sura.net!rsg1.er.usgs.gov!news.cs.indiana.edu!umn.edu!noc.msc.net!uc.msc.edu!apctrc!zjtp04
  4. From: zjtp04@trc.amoco.com (John T. Penn)
  5. Subject: Re: Setting up serial ports
  6. Message-ID: <1992Dec31.081322@trc.amoco.com>
  7. Originator: zjtp04@dolomite
  8. Sender: usenet@trc.amoco.com
  9. Organization: Amoco Production Company, Tulsa Research
  10. References:  <1992Dec30.200952.5153@panther.mot.com>
  11. Date: Thu, 31 Dec 1992 14:13:22 GMT
  12. Lines: 30
  13.  
  14.  
  15. In article <1992Dec30.200952.5153@panther.mot.com>, ronf@panther3.panther.mot.com (Ron Feigen) writes:
  16. > Being my first post, I hope this is the appropriate newgroup.
  17. > I am a Unix/C/Assembler type that finds himself in the position of having to
  18. > write/port an app. on an IBM PC.  One of the functions needed is to establish
  19. > carrier on a modem.  My problem?  How do I setup the com?: port using 'C'.
  20. > Asking the user to use the DOS mode command would be sort of kludgy.
  21. > Can anybody give some leads?  Books?  Examples?
  22. > Anyhelp would be greatly appreciated!!!!!!!!
  23. > Thanks in advance, 
  24. > -- 
  25. > >
  26. > Ron Feigen
  27. > ronf@panther.mot.com
  28.  
  29.  
  30. There are numerous ways of initializing a serial port with 'C'. My standard
  31. method is to directly write to the UART addresses. A more commonly used method
  32. is to use a library function such as `_bios_serialcom`. Most `C` compilers for
  33. DOS have this function or one that is similar. If you wish to write directly
  34. to the port addresses, the proper function to use would be 'outp','outport`,
  35. `outportb', etc., again depending on the compiler you are using.
  36. Good Hunting...
  37.  
  38. John
  39.