Specifications

Data Structures
1.8 Device Data Block (DDB)
Table 1–10 Contents of Device Data Block
Field Name Contents
DDB$L_LINK* Address of next DDB. A zero indicates that this is the last DDB in the DDB
chain.
DDB$L_UCB* Address of UCB for first unit attached to controller.
DDB$W_SIZE* Size of DDB.
DDB$B_TYPE* Type of data structure. The driver-loading procedure writes the constant
DYN$C_DDB into this field when the procedure creates the DDB.
DDB$L_DDT Address of DDT. The operating system can transfer control to a device driver
only through addresses listed in the DDT, the CRB, and the UCB fork block.
The DPT of every device driver must specify a value for this field.
DDB$L_ACPD Name of default ACP (or XQP) for controller. ACPs that control access to
file-structured devices (or the XQP) use the high-order byte of this field,
DDB$B_ACPCLASS, to indicate the class of the file-structured device. If
the ACP_MULTIPLE system parameter is set, the initialization procedure
creates a unique ACP for each class of file-structured device.
Drivers initialize DDB$B_ACPCLASS by invoking a DPT_STORE macro.
Values for DDB$B_ACPCLASS are as follows:
DDB$K_PACK Standard disk pack
DDB$K_CART Cartridge disk pack
DDB$K_SLOW Floppy disk
DDB$K_TAPE Magnetic tape that simulates file-structured device
DDB$T_NAME* Generic name for the devices attached to controller. The first byte of this
field is the number of characters in the generic name. The remainder of the
field consists of a string of up to 15 characters that, suffixed by a device unit
number, identifies devices on the controller.
DDB$T_DRVNAME* Name of device driver for controller. The first byte of this field is the number
of characters in the driver name. The remainder of the field contains a
string of up to 15 characters taken from the DPT in the driver.
DDB$L_SB* Address of system block.
DDB$L_CONLINK* Address of next DDB in the connection subchain.
DDB$L_ALLOCLS* Allocation class of device.
DDB$L_2P_UCB* Address of the first UCB on the secondary path. Another name for this field
is DDB$L_DP_UCB.
1.9 Driver Dispatch Table (DDT)
Each device driver contains a driver dispatch table (DDT). The DDT lists entry
points in the driver that system routines call, for instance, the entry point for the
driver start-I/O routine.
A device driver creates a DDT by invoking the system macro DDTAB. The fields
in the driver dispatch table are illustrated in Figure 1–12 and described in
Table 1–11.
1–35