[comp.os.msdos.programmer] Need help setting DTR or RTS high or low

sorrow@oak.circa.ufl.edu (06/21/91)

I need some code examples on how to set the DTR or RTS line on a 
RS-232C port high or low.  C or asm would be fine.

Thanks,

Brian
/*
Brian Hook -- MS-DOS Programmer for Contract
-----------------------------------------------------------------
"Seamus, that's my dog...I saw her today at the reception...sorry, sixTEEN
inches....better save the women and children first...but this one goes to 11!
..anymore of that plutonium nyborg?....there can be only ONE!....like a 
finger pointing to the moon....ease the seat back...one day closer to death
*/

msmith%peruvian.utah.edu@cs.utah.edu (Matthew Smith) (06/22/91)

In article <0094A6B3.5314B580@MAPLE.CIRCA.UFL.EDU> sorrow@oak.circa.ufl.edu writes:
>I need some code examples on how to set the DTR or RTS line on a 
>RS-232C port high or low.  C or asm would be fine.
>
>Thanks,
>
>Brian
>/*
>Brian Hook -- MS-DOS Programmer for Contract

The Modem Control Register (address base address+0x04) is a bit mask of the
various control lines, DTR, RTS, CTS, etc... 

To turn on RTS, turn on bit 1 (of bits 0-7 0=LSB), and to turn it off, set
it to 0.

DTR is controlled by bit 0 in the same register.

I hope this helps you out.  I figured it would be better than code...

Matt Smith
msmith@peruvian.utah.edu
University of Utah
Department of Computer Science