Article View: alt.msdos.programmer
Article #911Re: Setting up serial ports
From: John T. Penn
Date: Thu, 31 Dec 1992 14:13
Date: Thu, 31 Dec 1992 14:13
30 lines
1759 bytes
1759 bytes
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. > Can anybody give some leads? Books? Examples? > > Anyhelp would be greatly appreciated!!!!!!!! > > > Thanks in advance, > -- > > > > Ron Feigen > ronf@panther.mot.com There are numerous ways of initializing a serial port with 'C'. My standard method is to directly write to the UART addresses. A more commonly used method is to use a library function such as `_bios_serialcom`. Most `C` compilers for DOS have this function or one that is similar. If you wish to write directly to the port addresses, the proper function to use would be 'outp','outport`, `outportb', etc., again depending on the compiler you are using. Good Hunting... John
Technical Details
Message-ID:
<1992Dec31.081322@trc.amoco.com>Path:
arc1-ca.pugleaf.net!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!zjtp04References:
<1992Dec30.200952.5153@panther.mot.com>Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c Path: arc1-ca.pugleaf.net!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 From: zjtp04@trc.amoco.com (John T. Penn) Subject: Re: Setting up serial ports Message-ID: <1992Dec31.081322@trc.amoco.com> Originator: zjtp04@dolomite Sender: usenet@trc.amoco.com Organization: Amoco Production Company, Tulsa Research References: <1992Dec30.200952.5153@panther.mot.com> Date: Thu, 31 Dec 1992 14:13:22 GMT Lines: 30