Specifications

System Macros Invoked by Drivers
$VECINI
$VECINI
Begins the definition of a port vector table.
Format
$VECINI drivername, null_routine [,prex=PORT_] [,size=_LENGTH]
Parameters
drivername
Prefix (usually two letters) of the driver name (for example, DZ).
null_routine
Address of the driver’s null entry point, usually specified in the format
drivername$NULL. This address contains an RSB instruction.
[,prefix=PORT_]
Prefix to be added to the symbols defined in subsequent invocations of the $VEC
macro.
[,size]
Number of bytes allocated for the vector table.
Description
A terminal port driver uses the $VECINI macro to begin the definition of a port
vector table and initialize each table entry to point to the driver’s null entry
point. The $VECINI macro generates the label drivername$VEC at the beginning
of the table and drivername$VECEND at the end of the table.
The $VEC macro defines valid entries within the port driver vector table specified
by the invocation of the $VECINI macro, and the $VECEND macro ends the
table’s definition.
To use the $VECINI macro, the driver must include an invocation of the
$TTYMACS definition macro (from SYS$LIBRARY:LIB.MLB).
Example
$VECINI DZ32,DZ$NULL
$VEC STARTIO,DZ32$STARTIO ;Start new output
$VEC SET_LINE,DZ32$SET_LINE ;Set new parity/speed
$VEC XON,DZ32$XON ;Send XON
$VEC XOFF,DZ32$XOFF ;Send XOFF
$VEC STOP,DZ32$STOP ;Stop current output
$VEC ABORT,DZ32$ABORT ;Abort current output
$VEC RESUME,DZ32$RESUME ;Resume stopped output
$VEC MAINT,DZ32$MAINT ;Invoke maintenance functions
$VECEND
In this example, the $VECINI macro creates a port driver vector table. The table
entries defined by the eight subsequent invocations of the $VEC macro (PORT_
STARTIO, PORT_SET_LINE, and so on) are set up to point to the specified
routines in the port driver. The $VECINI macro initializes any entry point not
defined by a $VEC macro (for instance, PORT_SET_MODEM) with the address of
the null entry point, DZ$NULL. The $VECEND macro concludes the definition of
the port driver vector table.
2–105