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_msr()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
COM_MSR()

Syntax:     COM_MSR(<port>)

Arguments:  <port> denotes the interface to read the Modem
            Status Register (MSR), COM1: (1) or COM2: (2).

Returns:    A numeric value.
            A value of between 0 and 255, which corresponds to the
            contents of the MSR.

Usage:      It will not be possible to determine all the values of this
            Status Register by separate functions.  Use this function to
            test the corresponding but.  For example, the Delta Status
            information is bit 3.

               Bit          Definition
               ---          ----------
                0           Delta clear to send (DCTS)
                1           Delta data terminal ready (DDSR)
                2           Trailing edge ring (TERI)
                3           Delta data carrier detected (DDCD)
                4           Clear to send (CTS)
                5           Data terminal ready (DTR)
                6           Ring indicator (RI)
                7           Data carrier detect (DCD)

Note:       It is relatively easy to test several bits in the MSR
            simultaneously.  All delta bits in this register will be reset
            again by the read process.

Library:    CT1.LIB


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

Examples:   status = COM_MSR(1)

            IF ISBIT(status,4)                  && CTS (Bit-4) active?

            ...

            ENDIF



See Also: COM_CTS() COM_DCD() COM_DSR() COM_RING()

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