Specifications

Writing Device-Driver Tables
4.4 Building Driver Tables Using C
4.4.3.1 FDT Functions
The driver$ini_fdt_act function initializes the action routine and buffered function
mask fields in the FDT. The driver$ini_fdt_end function signals that initialization
of the FDT is complete. The bufflag parameter has the value BUFFERED if the
function is buffered, NOT_BUFFERED or DIRECT otherwise.
int driver$ini_fdt_act( FDT *fdt, unsigned long iofunc,
int ( *action )(),
unsigned long bufflag );
int driver$ini_fdt_end( FDT *fdt );
4.4.3.2 FDT Macros
The following macros invoke the corresponding function, check the status
returned and exit to the driver loader if the status is not a success code.
ini_fdt_act( fdt, func, action, bufflag )
ini_fdt_end( fdt )
4.4.4 Device Database Initialization/Reinitialization
The initialization and reinitialization function addresses are stored in DPT$PS_
INIT_PD and DPT$PS_REINIT_PD respectively. The function calls are:
func( crb,ddb,idb,orb,ucb );
with the following parameters:
crb Channel Request Block address
ddb Device Data Block address
idb Interrupt Data Block address
orb Owner Rights Block address
ucb Unit Control Block address
4.4.4.1 DPT_STORE_ISR
The dpt_store_isr and dpt_store_isr_vec macros are used to store the procedure
descriptor and entry point addresses of an interrupt service routine in a VEC
entry in a given Channel Request Block The dpt_store _isr macro fills in the first
or only VEC entry in a CRB. The dpt_store_isr_vec macro allows the index of the
VEC entry to be supplied.
The formats of the macros are:
dpt_store_isr( crb, isr);
or
dpt_store_isr_vec( crb, vecno, isr);
with the parameters:
crb Channel Request Block address
vecno Index (0, 1, 2...) of VEC entry to be
filled in
isr Interrupt service routine address
4–14