GDSX (Extended General Device Support) Manual

DEVICE^HANDLER Example, Design
Extended General Device Support (GDSX) Manual529931-001
5-18
I/O Control Blocks
I/O Control Blocks
Now examine the I/O control block (IOCB) representing the last $RECEIVE request (a
WRITE) passed to the task. TSCODE allocates an IOCB to manage each outstanding
nowait I/O. All IOCBs representing I/O operations for a particular task are linked to the
task’s TCB. An IOCB contains the following:
Optype, the I/O operation type
Iocnt, the I/O count in bytes returned from AWAITIO
Bufaddrx, the buffer address
Tcbaddr, the address of the task requesting the I/O
DCCBDECS contains USKELEX’s iocb^template and is shown in Appendix C.
Storage for IOCBs is declared by TSCODE and contained in extended memory.
Display the contents of the IOCB pointed to by lastrcviocb:
- DISPLAY (iocb-address) AS IOCB^TEMPLATE
and record the value of iocnt.
The buffer address is held in the doubleword variable bufaddrx. Record the value of
bufaddrx (buffer-address).
Now convert the buffer address value to octal with the command:
- D (buffer-address) IN OCTAL
and record the displayed quantity (octal-buffer-address).
The conversion to octal is necessary because high-level Inspect displays INT
variables, such as bufaddr, as signed quantities. Addresses in the upper 32K words of
your program’s data space will appear as negative numbers. Low-level Inspect, which
you will use to display the ASCII contents of buffers, expects unsigned values, octal by
default; hence, the conversion is necessary.
Enter low-level Inspect, and display the buffer contents in ASCII by entering:
- LOW
- A octal-buffer-address, 40
There should be eight spaces, followed by the reversed string of characters that you
entered at the application terminal.
Return to high-level Inspect and enter “R“ to resume program execution. The text you
observed at buffer-address should now display on the application terminal, except
for the additional datastream conversion. At the next breakpoint, enter STOP.
At the TACL terminal, confirm that both the GDSX process and the requester are gone.
Then log off all terminals.