GDSX (Extended General Device Support) Manual
DEVICE^HANDLER Example, Design
Extended General Device Support (GDSX) Manual—529931-001
5-16
Device Control Blocks
Storage for DCBs is declared at run time by TSCODE and is contained in extended
memory. The size of a DCB for a GDSX process depends on the EXTSUSIZE
configuration parameter, which can be supplied at startup time. Therefore, storage for
DCBs cannot be determined at compile time.
At startup time, depending on the EXTSUSIZE and MAXTERMS configuration
parameters, the maximum number of SUs that can be active simultaneously within a
GDSX process, TSCODE initializes an array containing pointers to each configured
DCB. See Figure 5-4. The index into this address array is stored in the variable
internal^term^no, which is passed by TSCODE’s call to the DEVICE^HANDLER to
create the task associated with the DCB. Finally, dcbtbl (found in the common^data
section of DCCBDECS) is the pointer to this array of addresses.
To get the octal address of the DCB, enter:
- DISPLAY (DCBTBL[INTERNAL^TERM^NO]) IN OCTAL
To see the contents of the DCB, use the octal value from the DISPLAY command:
- DISPLAY (octal-dcb-address) AS DCB^TEMPLATE
Record the displayed tcbaddr value (tcb-address). This is the address of the task
control block of the task that is mapped to the DCB. See Figure 5-5 for a preview of
the control block pointer tracing that will be done in the remainder of this exercise. The
task control block is explained shortly.
Figure 5-4. Locating DCBs
DCBTBL
DCB Pointer
Array Indexed by
INTERNAL^TERM^NO
DCB Size
DCBTBL (0)
VST019.vsd
.
.
.
.
.
.
DCBs