Email:
sales@wcscnet.com


Competent Technical Support By Knowledgeable Engineers

View Cart

Checkout

RSS Feed
Home
Products
Services
Support
File Download
Testimonials
NewsLetters
Press Releases
Tutorials
WebLog (News)
WCSC Partners
Developer Tools

Register for WCSC email updates

Wires No More!
$159.99 a pair


Wireless Serial Adapter
(Bluetooth to RS232)

 

Credit Card Merchant Services

How do I read the modem signals (CTS, DSR, RI, CD)?


This function assumes that COMMTSR.EXE is loaded and that COMMDRV.DRV is installed in the CONFIG.SYS file. The IOCTL$(1) call assumes the communication port was opened as in the example that ships with the product.

The following function returns the Modem Status Register which contains the Clear To Send, Data Set Register, Ring Indicator, and Carrier Detect.  'AND' with the following constants to determine the signal that is active.

16 - For Clear To Send
32 - For Data Set Ready
64 - For Ring Indicator
128 - For Data Carrier Detect

'************************************************************
'*=====GetMSR()                                             *
'*                                                          *
'*Description-                                              *
'*      Returns the amount of data that may be written to   *
'*      the serial port.                                    *
'*                                                          *
'*Syntax-                                                   *
'*      MSR% = GetMSR%                                      *
'*                                                          *
'*On Entry-                                                 *
'*                                                          *
'*On Exit-                                                  *
'*      Modem status.                                       *
'************************************************************
FUNCTION GetMSR%

pcb$ = SPACE$(124)
pcb$ = IOCTL$(1)

GetMSR% = ASC(MID$(pcb$, 69, 1))

END FUNCTION

 

 

 Updated: 04/03/2008

Copyright © 2008 by Willies Computer Software Co