GDSX Manual

DEVICE^HANDLER Example, Design
Extended General Device Support (GDSX) Manual134303
5-16
Device Control Blocks
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 TSCODEs 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
Figure 5-5. Control Block Pointer Tracing
CDT009
DCBTBL
DCBTBL (0)
DCB Pointer
Array Indexed by
INTERNAL^TERM^NO
DCBs
DCB Size
TCBADDR LASTRCVIOCB
IOCNT
BUFADDR [X]
TEXT
DCBs TCB IOCB BUFFER