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

  1. Xref: sparky alt.msdos.programmer:3081 comp.os.msdos.programmer:11772 comp.sys.ibm.pc.programmer:731 comp.lang.c++:18656 comp.lang.c:19166
  2. Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c
  3. Path: sparky!uunet!microsoft!hexnut!jenk
  4. From: jenk@microsoft.com (Jen Kilmer)
  5. Subject: Re: Setting up serial ports
  6. Message-ID: <1993Jan04.043635.5841@microsoft.com>
  7. Date: 04 Jan 93 04:36:35 GMT
  8. Organization: Microsoft Corporation
  9. References: <1992Dec30.200952.5153@panther.mot.com>
  10. Lines: 30
  11.  
  12. In article <1992Dec30.200952.5153@panther.mot.com> ronf@panther3.panther.mot.com (Ron Feigen) writes:
  13. >Being my first post, I hope this is the appropriate newgroup.
  14. >
  15. >I am a Unix/C/Assembler type that finds himself in the position of having to
  16. >write/port an app. on an IBM PC.  One of the functions needed is to establish
  17. >carrier on a modem.  My problem?  How do I setup the com?: port using 'C'.
  18. >Asking the user to use the DOS mode command would be sort of kludgy.
  19.  
  20. Well, if you wanted to do what the ms-dos mode command does, it
  21. does an int 21 to set up the serial port. The int 21 is implemented
  22. throught the serial port device driver [also a part of msdos unless 
  23. you've installed a replacement for the default one in io.sys] which
  24. eventually does a BIOS call. The BIOS then talks to the UART directly.
  25.  
  26. You can of course talk to the UART or the BIOS yourself, and skip msdos
  27. - particularily if you want to program the chip in a method not provided
  28. by msdos/BIOS. The book _DOS Programmer's Reference_ by Terry Dettmann,
  29. published by QUE, covers the MSDOS, BIOS, and UART. [Don't confuse this
  30. book with the microsoft ms-dos programmer's reference - the latter is
  31. only the official programmer's doc for ms-dos 5.]  All C compilers I've
  32. worked with provided library functions for this - check it out.
  33.  
  34. Someone else has posted how to get the UART spec; you can purchase the
  35. BIOS doc from IBM.
  36.  
  37. -jen
  38.  Not speaking for microsoft. Just cause I work with msdos doesn't
  39.  mean I'm totally nuts.
  40.  
  41.  
  42.