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

  1. Xref: sparky alt.msdos.programmer:3060 comp.os.msdos.programmer:11723 comp.sys.ibm.pc.programmer:718 comp.lang.c++:18608 comp.lang.c:19092
  2. Path: sparky!uunet!van-bc!mdavcr!norman
  3. From: norman@mdavcr.mda.ca (Norman Goldstein)
  4. Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c
  5. Subject: Re: Setting up serial ports
  6. Message-ID: <3923@mdavcr.mda.ca>
  7. Date: 31 Dec 92 19:48:35 GMT
  8. References: <1992Dec31.081322@trc.amoco.com>
  9. Followup-To: alt.msdos.programmer
  10. Organization: MacDonald Dettwiler, 13800 Commerce Parkway, Richmond, BC, Canada  V6V 2J3
  11. Lines: 45
  12.  
  13. zjtp04@trc.amoco.com (John T. Penn) writes:
  14. : In article <1992Dec30.200952.5153@panther.mot.com>, ronf@panther3.panther.mot.com (Ron Feigen) writes:
  15. : > Being my first post, I hope this is the appropriate newgroup.
  16. : > 
  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. : > 
  23. : > Anyhelp would be greatly appreciated!!!!!!!!
  24. : > 
  25. : > 
  26. : > Thanks in advance, 
  27. : > -- 
  28. : > 
  29. : > >
  30. : > Ron Feigen
  31. : > ronf@panther.mot.com
  32. : There are numerous ways of initializing a serial port with 'C'. My standard
  33. : method is to directly write to the UART addresses. A more commonly used method
  34. : is to use a library function such as `_bios_serialcom`. Most `C` compilers for
  35. : DOS have this function or one that is similar. If you wish to write directly
  36. : to the port addresses, the proper function to use would be 'outp','outport`,
  37. : `outportb', etc., again depending on the compiler you are using.
  38. : Good Hunting...
  39. : John
  40.  
  41. If you want all the hardware details of the serial port, of course the
  42. hardware spec (e.g. for National Semiconductor 16450) will have all the
  43. "hard" :-) details.  Borland is offering a sample driver (source) from their
  44. bulletin board, (408)439-9096; it is called SERIAL.ZIP.  I have a shareware
  45. product called SERIOUS which is a DOS installable device driver for 
  46. serial ports, and offers a C/C++/ASM interface to the application programmer.
  47. It is available in the net ibm archives, and various boards elsewhere.  If
  48. you want to try it, and have trouble finding it, please let me know.
  49. -- 
  50. NAME     Norman Goldstein
  51. EMAIL    norman@mda.ca
  52. SNAIL    13800 Commerce Parkway, Richmond BC, Canada V6V 2J3
  53. PHONE    (604) 278-3411 ext 2779 (Voice); (604) 278-2936 (FAX)
  54.