Specifications

Writing Device-Driver Tables
4.3 Function Decision Table
An OpenVMS AXP device driver specifies one or more legal I/O functions by
supplying the address of an upper-level FDT action routine for that function to
the FDT_ACT macro. The FDT_ACT macro initializes the slot in the FDT action
routine vector corresponding to each supplied function code with the procedure
value of the specified routine.
Multiple invocations of the FDT_ACT macro, in sum, define the full set of I/O
functions serviced by the driver. An illegal I/O function is one that the driver
does not list in any FDT_ACT macro invocations. Its vector slot contains the
procedure value of the illegal I/O function processing routine (EXE$ILLIOFUNC).
Note, however, only one upper-level FDT action routine can service any given
I/O function. If you reuse an I/O function code in an FDT_ACT invocation, the
compiler generates an error of the form:
%MACRO-E-GENERR, Generated ERROR: Multiple actions defined for function IO$_xxxxxx
A consequence of this limitation is that, if the preprocessing of a given function
requires that several routines be executed, the upper-level FDT action routine
must set up the appropriate call chain. Writers of OpenVMS VAX drivers should
take special note of this difference between OpenVMS VAX and OpenVMS AXP
FDT processing. On OpenVMS VAX systems, the $QIO system service processes
entries in the order in which they appear in the FDT. When a function code is
associated with more than one FDT routine, the system service sequentially calls
every routine specified for the function code until a routine stops the scan by
aborting, completing, or queuing an I/O request.
For a description of the FDT_INI, FDT_BUF, and FDT_ACT macros, and an
example of their use, see OpenVMS AXP Device Support: Reference.
4.3.1 OpenVMS AXP I/O Function Codes
Table 4–1 lists the physical, logical, and virtual I/O function codes defined by the
operating system. A complete list of function codes and values is contained in the
macro iodef.h in SYS$LIBRARY:SYS$LIB_C.TLB.
Table 4–1 I/O Function Codes
Function Description Equivalent Symbols
Physical I/O
IO$_NOP† No operation
IO$_UNLOAD Unload drive (required by all
disk drivers)
IO$_LOADMCODE† (load microcode), IO$_
START_BUS† (start LAVc bus)
IO$_SEEK Seek cylinder IO$_SPACEFILE† (space files), IO$_
STARTMPROC† (start microprocessor),
IO$_STOP_BUS† (stop LAVc bus)
IO$_RECAL† Recalibrate drive IO$_DUPLEX† (enter duplex mode), IO$_
STOP† (stop), IO$_DEF_COMP† (define
network component)
IO$_DRVCLR† Drive clear IO$_INITIALIZE (initialize), IO$_MIMIC†
(enter mimic mode), IO$_DEF_COMP_
LIST† (define network component list)
†Unsupported; subject to change without notice
(continued on next page)
4–6