GDSX (Extended General Device Support) Manual

DEVICE^HANDLER Example, Design
Extended General Device Support (GDSX) Manual529931-001
5-17
Task Control Blocks
To confirm that the correct DCB has been located, you can display the name and
access name fields in ASCII, as follows:
- DISPLAY (octal-dcb-address) AS DCB^TEMPLATE IN ASCII
Verify that the value of the variable name is the OUT file ($TC1) opened by the
requester, and that the access name was correctly derived from the qualifier(s) in the
requesters OUT file name.
Task Control Blocks
When a task is started, TSCODE assigns a task control block (TCB), which is used to
manage the task. When the requester application in this example opened terminal
$TC1, TSCODE opened the terminal, created a DCB to manage communication to the
terminal, created a DEVICE^HANDLER task that maps to the DCB, and created a TCB
to manage the task. The TCB includes the following:
Pointers to the linked list of I/O control blocks (IOCBs, to be discussed shortly)
owned by the task.
Lastrcviocb, the address of the IOCB representing the last $RECEIVE request
passed to the task.
Term, the GDSX internal file number of the device to which this task is mapped.
Dcbaddr, a pointer to the associated device control block.
DCCBDECS contains USKELEX’s tcb^template and is shown in Appendix C. Storage
for TCBs is declared by TSCODE and is contained in extended memory.
Display the contents of the DEVICE^HANDLER task’s TCB by issuing:
- DISPLAY (tcb-address) AS TCB^TEMPLATE
Record the value of lastrcviocb (iocb-address).
Figure 5-5. Control Block Pointer Tracing
TCBADDR
DCBs
TCB
LASTRCVIOCB
IOCNT
BUFADDR [X]
TEXT
IOCB BUFFER
VST020.vsd