Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>com_mcr()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 COM_MCR()
 Reads or sets the Modem Control Register (MCR)
------------------------------------------------------------------------------
 Syntax

     COM_MCR(<nComPort>,[<nMCR>]) --> nMCR

 Arguments

     <nComPort>  Designates the port (1 to 4) for which the Modem Control
     Register (MCR) is read or set.

     <nMCR>  Designates a specified parameter between 0 and 255.  If this
     parameter is not specified, then MCR is read only.

 Returns

     COM_MCR() returns the contents of the Modem Control Register.

 Description

     The Modem Control Register can be read only and/or read and set.  The
     second optional parameter determines if a new value is set.  The bits
     have the following meaning:

     Table 3-4: MC Register Coding
     ------------------------------------------------------------------------
     Bit     Symb.Const.    Definition
     ------------------------------------------------------------------------
     0       MCR_ERROR      Parameter error
     1       MCR_DTR        Data terminal ready (DTR)
     2       MCR_RTS        Request to send (RTS)
     4       MCR_OUT_1      OUT 1
     8       MCR_OUT_2      OUT 2
     16      MCR_LOOP       LOOP
     ------------------------------------------------------------------------

 Note

     .  The OUT1, OUT2, and LOOP control bits can only be changed
        using this function.  Additional functions are available for DTR and
        RTS.

 Example

     nStatus  :=  COM_MCR(1)         // Port 1 MCR is read only

     IF NUMAND(nStatus, 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