General
Application area: | Linking and loading; see "Linking and loading" |
Macro type: | 24-bit interface: type R; see "R-type macros"31-bit interface: type S |
The following applies when using the 31-bit interface:
No return code is transferred in the standard header.
TABLE is replaced by the ETABLE and ETABIT macros.
Macro description
The user program employs the TABLE macro to transfer a table of entries to the dynamic binder loader DBL. These entries provide the DBL with information about the names and addresses of control sections (CSECT), entry points (ENTRY) and common areas
(COMMON), enabling the DBL to use the transferred values to resolve external references, etc.
In particular, a user program which was linked by the TSOSLNK linkage editor, loaded with the ELDE static loader and which used the LINK macro can employ the TABLE macro to provide the DBL (called by means of the LINK macro) with information about the program structure. This prevents the DBL from reloading modules which have already been linked into the program by TSOSLNK.
During macro processing, a check is performed for each table entry as to whether the name of a load point is already known due to a previous load operation or a previous TABLE macro call. If the result of this check is positive, a warning is output and macro processing is continued normally.
Macro format 1 and description of operands
TABLE |
{addr / (r) }, {length / (r)} [,PARMOD=24 / 31] [,MF=L / (E,..) / C / D] |
Format 2
PBTABD |
[,MF=(D,p) / (C,p)] |
addr
Symbolic address of the table (see format below).
(r)
Register containing the address value “addr”. Register R1 must be used for the 24-bit interface.
If the 31-bit interface is used, the operand list address is loaded to register R1, which consequently is no longer available for storing user-specified information.
length
Specifies the length of the table in bytes.
(r)
Register containing “length”. Register R0 must be used for the 24-bit interface.
PARMOD=
Controls macro expansion. Either the 24-bit or the 31-bit interface is generated.
If PARMOD is not specified here, macro expansion is performed according to the specification for the GPARMOD macro or according to the default setting for the assembler (= 24-bit interface).
24
The 24-bit interface is generated. Data lists and instructions use 24-bit addresses (address space <= 16 Mb).
31
The 31-bit interface is generated. Data lists and instructions use 31-bit addresses (address space <= 2 Gb). Data lists start with the standard header.
MF=
For the 31-bit interface only:
The C-/D form is called with MF=C/D or MF=(C,p)/(D,p). p = prefix (up to 3 characters); default setting: p = I. The prefix only changes the field names (not the symbolic names for equates).If p = * is specified, the symbolic names are generated without a prefix. When the data area is assigned values dynamically, the initialization values for the standard header should be transfered from a data area generated with MF=L.
For a general description of the MF operand, its operand values and any subsequent operands (e.g. for a prefix) see section “S-type macros”. Valid MF values are given at the beginning of the macro description in “macro type” and in the call format.
The PBTABD macro generates a description of the table as a DSECT or data list for the 31-bit interface, where:
MF=
Specifies whether a DSECT or a data list is generated.
p = prefix (up to 3 chars.) of all symbolic names in the list.
If p = * is specified, names without prefix are generated.
D
A DSECT is generated; default setting.
C
A data list is generated.
Structure of the table for DBL
when the 24-bit interface is used:
Displacement | Length | Entry/function |
0 | 1 | X'02': identifies a CSECT or ENTRY |
1 | 8 | name of the ENTRY, COMMON or CSECT (8 characters) |
9 | 3 | computed address |
12 | 3 | length of the COMMON (applies to COMMON only) |
when the 31-bit interface is used:
Displacement | Length | Entry/function |
0 | 1 | X' F0' : identifies a CSECT |
1 | 8 | name of the ENTRY, CSECT or COMMON (8 characters) |
9 | 1 | attributes: AMODE = 24 --> X'02' AMODE = 31 --> X'04' |
10 | 2 | X'00' (required for alignment) |
12 | 4 | load address (31-bit-address) |
16 | 4 | length of the COMMON: otherwise 4 X'00' |
The PBTABD macro generates the layout of this table.
Return information and error flags
A return code relating to the execution of the TABLE macro is transferred in register R15. Note that a different code is returned depending on the interface used (24-bit or 31-bit interface, as specified by means of the PARMOD operand or the GPARMOD macro).
if PARMOD=24:
R15:
+---------------+ | | | | | | | | | | | |a|a| +---------------+
A return code relating to the execution of the TABLE macro is transferred in the rightmost byte of register R15.
Return code | Meaning |
X'00' | Macro successfully executed. |
X'04' | Macro not successfully executed; contents of register R1 deleted. |
if PARMOD=31:
Register R1 is loaded with the address of the operand list.
R15:
+---------------+ | | | | | |c|c|b|b|a|a|a|a| +---------------+
A structured return code relating to the execution of the TABLE macro is transferred in register R15 (cc=Subcode2, bb=Subcode1, aaaa=Maincode)
where: cc=00: function executed normally
cc=0C: function not executed.
cc | bb | aaaa | Meaning |
00 | 00 | 0000 | Normal execution. |
0C | 00 | 0004 | Parameter list not aligned. |
0C | 00 | 0008 | Parameter list not assigned or address in register R1 outside address space. |
0C | 00 | 0014 | A register number > 15 was specified. |
0C | 00 | 0018 | Illegal utilization of a reserved field. |
0C | 00 | 0100 | Error in length specification (“length” operand). |
0C | 00 | 0104 | Incorrect name specification (table entry; displacement 1). |
0C | 00 | 0108 | Wrong type specification; (table entry; displacement 0). |
0C | 00 | 010C | Incorrect AMODE specification (table entry). |
0C | 00 | 0110 | Invalid load address specified (table load address). The address is outside |
0C | 00 | 0200 | System error. |
0C | 00 | 0300 | Internal error during memory request ($REQM) or release of memory space |
00 | 01 | FFFF | Invalid specification for UNIT/FUNCTION in standard header. |
00 | 03 | FFFF | Invalid specification for VERSION in standard header. |