In COBOL V5, there is one BL<n> cell location table for each
program or subprogram in a compile unit (that is, entry points). Given
an entry point, you can follow a relative offset chain that leads
to the base locator table, as follows:
entry point -> PPA1 -> PPA3 -> base locator table
The
COBOL base locator table consists of the following:
- COBOL base locator table header
- 0 or more base locator cells array entry
- 2 NULL bytes to signal end of list
Each base locator cells array entry is variable length and contains
information to locate the base locator cells array. There can be more
than one cells array entry in a table for a particular cell type.
Header layout for the base locator table:
Table 1. Header layout
for the base locator tableOffset bytes (bits) |
Length bytes (bits) |
Field name |
0 |
1 |
base locator table version (currently 1) |
1 |
1 |
reserved |
2 |
2 |
header length (the number of bytes from the
beginning of the header to the first byte of the base locator cells
array entry) |
4 |
4 |
length of base locator cells arrays (size of
all base locator cells array entries plus the 2 end-of-list NULL bytes) |
Entry layout for the base locator cells array:
Table 2. Entry
layout for the base locator cells arrayOffset bytes (bits) |
Length bytes (bits) |
Field name |
0 |
0 (5) |
base locator cells type |
|
|
0: end of list |
|
|
1: BLF cells |
|
|
2: BLL cells |
|
|
3: BLX cells |
|
|
4: BLO cells |
|
|
5: BLT cells |
|
|
6: BLV cells |
0 (5) |
0 (3) |
Access method |
|
|
0: Stack |
|
|
1: NORENT static |
|
|
2: 32-bit RENT static |
|
|
3: 24-bit RENT static |
1 |
0 (2) |
[*] byte size of base locator cells array count |
|
|
specified value + 1 (that is, 0 means BL cells
array size is 1 byte) |
1 (2) |
0 (3) |
[**] unsigned byte offset to next entry from
the 'future expansion' field address |
1 (5) |
0 (3) |
reserved |
2 |
4 |
unsigned offset to base locator cells array |
|
|
This field is used to calculate the starting
address of the base locator cells array, each array entry occupies
4 bytes, and contains the address of a base locator cell. The unsigned
offset is from: |
|
|
Access method==0: top of stack address |
|
|
Access method==1: address of NORENT static |
|
|
Access method==2: address of 32-bit RENT static |
|
|
Access method==3: address of 24-bit RENT static |
6 |
see [*] |
array count for base locator cells |
6 + [*] |
see [**] |
future expansion |