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