Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!olivea!apple!altos!gumby!jerry From: jerry@gumby.Altos.COM (Jerry Gardner) Newsgroups: comp.os.msdos.programmer Subject: Re: Serial port control? Message-ID: <4793@gumby.Altos.COM> Date: 9 Apr 91 22:13:15 GMT References: <1991Apr8.044312.29004@hubcap.clemson.edu> <4790@gumby.Altos.COM> <1991Apr9.024404.9824@news.iastate.edu> Reply-To: jerry@altos.COM (Jerry Gardner) Distribution: na Organization: Altos Computer Systems, San Jose, CA Lines: 25 In article <1991Apr9.024404.9824@news.iastate.edu> tabu6@CCVAX.IASTATE.EDU writes: >In article <4790@gumby.Altos.COM>, jerry@gumby.Altos.COM (Jerry Gardner) writes: }>To deassert DTR, write a 0 to bit zero of the serial port's Modem Control }>register. This register is at I/O port address 0x3fc for COM1 and at }>0x2fc for COM2. Writing a zero to the register will deassert all of the }>modem control lines. An example in C follows: }> }> }> outp(0x3fc, 0); /* turn off all modem control lines */ } }Not really a good idea, they might not all get reset to the proper value the }next time you go to use it. A better idea would be: } } outportb(0x3fc,(inportb(0x3fc) & 0xfe)); /* set bit 0 to 0 */ A very bad idea... No com program should ever make assumptions about the prior state of the modem control lines when it starts up. It should always explicitly assert whatever lines it needs asserted. -- Jerry Gardner, NJ6A Altos Computer Systems UUCP: {sun|pyramid|sco|amdahl|uunet}!altos!jerry 2641 Orchard Parkway Internet: jerry@altos.com San Jose, CA 95134 Help stamp out vi in our lifetime. (408) 432-6200