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

Syntax:     COM_LSR(<port>)

Arguments:  <port> denotes which serial interface is to read the Line
            Status Register (LSR), COM1: (1) or COM2: (2).

Returns:    A numeric value.
            Contents of the Line Status Register.

Usage:      The Line Status Register will make the following information
            available:

               Bit          Definition
               ---          ----------
                0           Data ready
                1           Overrun error (overflow)
                2           Parity error (parity)
                3           Frame error (framing)
                4           BREAK recognized
                5           Transmission holder register empty
                6           TX shift register empty
                7           Not used

Note:       The Line Status \register may only be examined via this
            function.  Some bits in this register will be reset by a read
            process (see technical documentation).

Library:    CT1.LIB


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

Examples:   status = COM_LSR(2)                 && Read LSR
                                                && of port 2

            IF ISBIT(status,4)                  && Bit-4 set?
               ? "BREAK detected - Break."
            ENDIF





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