GDSX Manual

LINE^HANDLER Example, Design
Extended General Device Support (GDSX) Manual–134303
7-22
The IOCB
The IOCB
Record the IOCB address indicated by oldest (old-iocb). Look at the contents of this
IOCB with the following command:
- DISPLAY (old-iocb) AS IOCB^TEMPLATE
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:
- DISPLAY (buffer-address) IN OCTAL
and record the displayed value (octal-buffer-address).
Go to low-level Inspect, and display the contents of the text buffer of old-iocb with
the command:
_ A octal-buffer-address, 20
The first four words of the buffer should contain the most recent prompt string displayed
on the application terminal.
Tracing a ^CANCEL
Return to high-level Inspect. Clear the breakpoint in the main loop of
LINE^HANDLER:
- LIST BREAKPOINT
- CLEAR 1
Set a new breakpoint at the statement beginning with “IF
(WT^RD^IOCB^LIST[OLDEST]“ in the CANCEL^ITC subprocedure of
LINE^HANDLER by entering:
- SOURCE SEARCH "IF (WT"
- BREAK #line
Then resume program execution.
At the TACL terminal, enter SCF and stop the SU whose prompt currently appears on
the application terminal:
> SCF
-> ABORT SU $GDS.#LX.Tn
At the Inspect terminal, you should see that the program encountered the breakpoint at
the CALL ^CANCEL statement.
Display the value of tcb.term (the ITC file number that the DEVICE^HANDLER task
uses for intertask communication):
- DISPLAY TCB.TERM
Resume program execution. This time your process should hit the breakpoint in the
CANCEL^ITC SUBPROC. Display the values of oldest and newest. What is the value