Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>com_mcr()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
COM_MCR()

Syntax:     COM_MCR(<port>[,<expN1>])

Arguments:  <port> denotes which serial interface to read or set the
            Modem Control Register (MCR), COM1: (1) or COM2: (2).
            [<expN1>] The MCR will only be read if this argument is not
            indicated.  Otherwise, It will output the value passed,
            between 0 and 255, into the register.

Returns:    A numeric value.
            The contents of the Modem Control Register.

Usage:      It can be used to read the current value of the Modem
            Control Register and to set a new value at the same time.
            The second optional argument defines the new value setting.

               Bit          Definition
               ---          ----------
                0           Data terminal ready (DTR)
                1           Request to send (RTS)
                2           OUT1
                3           OUT2
                4           LOOP
                5           = 0
                6           = 0
                7           = 0

Note:       It is only possible to change the control bits OUT1, OUT2
            and LOOP via this function.  Separate functions are available
            for DTR and RTS.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   status = COM_MCR(1)                 && The MCR of port 1
                                                && will only be read

            IF NUMAND(status,3) = 3
               ? "DTR and RTS are active."
            ENDIF



See Also: COM_DTR() COM_RTS()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson