Unit CommSpy

COMMSPY Unit was developed from ModemSpy, which is described below.} (********************************************************************** * * * Modem Spy - Main Unit * * * * This program is supplied as is. I tried to do my best. Suggestions * * enhancements, positive critics are most welcome. If you like this * * stuff, just drop me a few lines on a postcard with a nice stamp * * and send it to: * * Dr. Martin Mohnhaupt * * Mediterranean Shipping Company SA * * 18 Chemin Rieu * * CH - 1208 Geneva (Switzerland) * * * * Bottles of (good) wine will not be refused! * * * * Internet: mmohnhaupt@ping.ch * * * * E N J O Y !!! *

Classes

Functions

CheckCommPortLineStatusRegister - CheckComMPortModemControl
CheckCommPortModemControl - CheckComMPortStatusRegister
CheckCommPortStatusRegister - ---------------------------------------------------------------------
CommInit - ---------------------------------------------------------------------
PeekW -
RWPort - ---------------------------------------------------------------------

Types

Constants

CTS
DCD
DSR
DTR
LINESTATUS
MODEMCONTROL
MODEMSTATUS
RI
RTS
RxD
TxD

Variables

Port
PortWord
psCTS
psDCD
psDSR
psDTR
psRI
psRTS
psRxD
psTxD


Functions


procedure CheckCommPortLineStatusRegister;

CheckComMPortModemControl

procedure CheckCommPortModemControl;

CheckComMPortStatusRegister

procedure CheckCommPortStatusRegister;

---------------------------------------------------------------------

procedure CommInit;

---------------------------------------------------------------------

function PeekW( Segm, Offs : word ) : Word;


function RWPort( port : word ) : byte;

---------------------------------------------------------------------

Types


Constants

CTS = $10

Data Set Ready

DCD = $80

Some masks...

DSR = $20

Ring Indicator

DTR = $01

Request To Send

LINESTATUS = 5

MODEMCONTROL = 4

Register offsets from the base I/O addresses

MODEMSTATUS = 6

RI = $40

Data Carrier Detect

RTS = $02

Data Transmitter Empty

RxD = $01

Clear To Send

TxD = $40

Received Data Ready

Variables

Port : Word

Data Terminal Ready

PortWord : Word

psCTS : Boolean

psDCD : Boolean

psDSR : Boolean

psDTR : Boolean

psRI : Boolean

psRTS : Boolean

psRxD : Boolean

psTxD : Boolean