This general macro has two functions. The primary function is to
locate the entry for a specific line number, interchange address, terminal
address (LNIATA) in the terminal address table (WGTA). It also provides
the user with the address and the equates for a table describing the (WGTA
parameter table).
Format
- label
- A symbolic name can be assigned to the macro statement.
- access
- The valid options for ACCESS are either 'R' or 'W'
- R
- If the parameter is omitted the default value is 'R'. The R
option requests the CINFC macro to be issued with the fast option.
(This does not change the storage protect key.)
- W
- When the W option is used, the CINFC macro is issued with the write
option. (This causes a storage protect key of zero to be placed in the
current PSW.) This is the normal usage of the macro. It is
issued whenever the user wants to find the address of a specific LNIATA entry
in the terminal address subtable.
- TABLE
- The omission of TABLE is the normal case. This parameter is coded
'TABLE' when a user wants to find the address in the control program
of a table describing the WGTA table.
- MASKED
- MASKED is coded 'MASKED' when it is used. This parameter
can be used only by C-type segments and is rejected if it is used by E-type
(ECB) segments. If MASKED is coded, the ACCESS and TABLE parameters are
ignored. This parameter provides an alternate entry point to the WGTAC
service routine for C-type segments.
Segments that use the masked parameter must be running with a storage key
that allows alteration of protected storage (key of 0 or F). Use of
this parameter allows the interrupt processing routines to run the WGTAC
macro.
- MODEC
- Correct values are:
- YES
- WGTAC macro generation issues a MODEC macro to put the user into 31-bit
addressing mode. This is necessary to access the WGTA if it resides
above the 16-megabyte boundary. YES is the default when MODEC is
omitted.
- NO
- WGTAC macro generation does not issue a MODEC. The user is in
control of setting the mode.
WGTAC will return in 31-bit mode regardless of the setting of the MODEC
parameter if it is invoked in 31-bit mode. If it is invoked in 24-bit
mode, it will return in 31-bit mode, unless MODEC is NO, the TABLE parameter
is specified and the MASKED parameter is not specified when it will return in
24-bit mode.
Entry Requirements
- R9 must contain the ECB address.
- When the TABLE and MASKED parameters are not coded, R1 must contain the
LNIATA and CPUID and R2 must be available to this macro routine.
- When only the TABLE parameter is coded, no entry requirements are
necessary.
- When MASKED is coded, the ACCESS and TABLE parameters are ignored; R1
must contain the LNIATA and CPUID.
Return Conditions
- Control is returned to the next sequential instruction.
- The condition code is unknown.
- When the ACCESS parameter is coded, R1 contains the address of the LNIATA
entry in the WGTA table or zeros if the LNIATA was not found. The
contents of R2, R14, and R15 are unknown and all other registers are
unchanged.
- When the TABLE parameter is coded, R14 contains the address of the table
describing the WGTA table in the control program. R15 is unknown and
the other registers are unchanged.
- When the MASKED parameter is coded, R1 contains the address of the LNIATA
entry in the WGTA table or zeros if the LNIATA was not found. The
content of R14 is unknown and all other registers are unchanged.
- When the ACCESS parameter is coded W, a storage protect key of zero is
placed in the current PSW.
Programming Considerations
- This macro can be executed on any I-stream.
- This macro is coded to be serially reusable only. It can be used by
the interrupt processing routines only when the masked parameter is
specified.
- The CINFC macro is used to obtain the address of the WGTA parameter table
with all uses of this macro.
- The table parameter should only be used by restart routines when the WGTA
table is being constructed.
- The masked parameter should be used only by the interrupt processing
routines.
- The MODEC=YES option is ignored in an ISO-C segment (coded with BEGIN
TPFISOC=YES).
Examples
- All defaults WGTAC call
LOC WGTAC
This call requests read access to the WGTA table. The program
issuing the macro is not using the CP-only masked entry point. The
macro sets the 31-bit addressing mode switch upon entry.
- Write access to the WGTA table
LOCW WGTAC W,MODEC=NO
This call requests write access to the WGTA table but doesn't set the
31-bit addressing mode switch. Either the switch has already been set
earlier or 24-bit addressing is required by the calling program.
- Read access to the WGTA table
TABL WGTAC R,TABLE
Read access to the WGTA is requested by this call. A pointer to a
table of addresses and constants describing the WGTA area is returned in
R14.
- Write access to the WGTA table
TABLW WGTAC W,TABLE
Similar to the previous example write access to the WGTA is requested by
this call. A pointer to a table of addresses and constants describing
the WGTA area is returned in R14.
- Masked access
MASK WGTAC ,,,MASKED
This requests the alternate CP-only entry point. The parameters
between the commas default (Read access, no parameter table, addressing mode
untouched). If required by the control program, they can be set
independently.