Path: utzoo!attcan!uunet!samsung!xylogics!transfer!lectroid!pwllheli.sw.stratus.com!dts From: dts@pwllheli.sw.stratus.com (Daniel Senie) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: Programming a COM port, raising DTR Message-ID: <1066@lectroid.sw.stratus.com> Date: 11 Apr 90 16:37:24 GMT References: <819@ramona.Cary.NC.US> Sender: usenet@lectroid.sw.stratus.com Reply-To: dts@pwllheli.sw.stratus.com (Daniel Senie) Organization: Stratus Computer, Inc. Lines: 21 |>I am looking for code examples (MASM or C) of how to properly raise |>DTR on a COM port. I have an application which dials the modem |>after raising DTR. The problem is that this application works fine |>on most systems, but on a few systems it simply won't raise DTR all |>the time. Here is a segment of code I use to do it: |> |> MOV DX, port address + offset for modem control register |> MOV AL,0BH |> OUT DX,AL |> You should read the modem control register and set the DTR bit by ORing it into the value read. To clear it, AND in the inverse pattern. You should never blast a new value into an I/O port without first reading the contents. Since you only wanted to change the one bit, don't clobber the rest. Daniel Senie UUCP: uunet!lectroid!dts Stratus Computer, Inc. ARPA: dts@lectroid.sw.stratus.com 55 Fairbanks Blvd. CSRV: 74176,1347 Marlboro, MA 01752 TEL.: 508 - 460 - 2686