GDSX (Extended General Device Support) Manual
LINE^HANDLER Example, Design
Extended General Device Support (GDSX) Manual—529931-001
7-22
Line Control Blocks
Line Control Blocks
Now the line control block (LCB) for the LINE file can be examined. An LCB is the
internal representation of a LINE and is used to manage a LINE^HANDLER task’s
communication with a file. When SCF was used to configure the LINE, TSCODE
assigned an LCB to manage the terminal. When the LINE object was started,
TSCODE created a LINE^HANDLER task that mapped to the LCB.
The LCB contains:
•
The variable name that contains the name of the LINE object configured with SCF
($LX in this example).
•
The access name, the name of the file actually opened for the corresponding LINE
($TC1 in this example).
•
The variable tcbaddr, a pointer to the associated task’s task control block.
ULHDECSE contains USKELEX’s line^template and is included in Appendix C.
The length of an LCB is determined at compile time, unlike the length of a DCB, which
is not established until run time (see Inspecting the DEVICE^HANDLER Example on
page 5-14.) The number of LCBs allocated depends on the MAXLINES configuration
parameter supplied at run time. MAXLINES specifies the maximum number of LINEs
that can be configured simultaneously within a GDSX process (those added with SCF
and not started, plus those added and started).
At startup time, linetbl (in the comman^data section of DCCBDECS) is initialized to
point to the array of LCBs, contained in extended memory. The index into this array is
internal^line^no, which is passed by TSCODE’s call to the LINE^HANDLER to create
the task associated with the LCB.
Display the internal^line^no parameter (line) passed to the LINE^HANDLER by
TSCODE:
-DISPLAY INTERNAL^LINE^NO
Then observe the contents of the LCB:
-DISPLAY LINETBL[line]
The Task Control Block
Record the displayed tcbaddr value (tcb-address). This is the address of the task
control block of the task that is mapped to the LCB.
Verify the LINE’s name and access name by issuing the following commands:
- DISPLAY LINETBL[line].NAME FOR 6 IN ASCII
- DISPLAY LINETBL[line].ACCESSPOINT FOR 10 IN ASCII