• |
If the first bit is a 0, then the next 8 bits are loaded according to the value of the location counter.
|
• |
If the first bit is a 1, then the next 2 bits are interpreted as follows:
|
| 00 |
Special link item, defined below.
|
| 01 |
Program relative.
The next 16 bits are loaded after being offset by the program segment origin.
|
| 10 |
Data relative.
The next 16 bits are loaded after being offset by the data segment origin.
|
| 11 |
Common relative.
The next 16 bits are loaded after being offset by the origin of the currently selected common block.
|
The following special items are followed by a name field only:
|
0000 |
Entry symbol.
The symbol indicated in the name field is defined in this module, so the module should be linked if the current file is being searched, as indicated by the S switch.
[PUBLIC declaration]
|
0001 |
Select common block.
Instructs LINK-80 to use the location counter associated with the common block indicated in the name field for subsequent common relative items.
|
0010 |
Program name.
The name of the relocatable module.
|
0011 |
Request a library, e.g. performed by assembler pseudo-instruction .request library
|
0100 |
Extension MS-LINK.
Such an element looks similar to a name field only.
The first character of this field defines another subdivision.
More information may follow.
An extension link looks in general as follows: 1 00 0100 lll s bbbbbb .
With:
lll | Three bits defining the length of the field bbbbbb . |
s | An 8 bit extension subdivision. |
bbbbbb | 1 up to 6 characters defining an external symbol. |
Supported subdivisions are:
5 | X'35' | COBOL overlay marker |
A | X'41' | Arithmetic operation (Arithmetischer Operator)
The next byte after the 'A' defines one of several operations.
Operator | Definition |
Operator | Definition |
01 |
Pop Byte. A byte result is popped off the expression stack.
|
02 |
Pop Word. A 16-bit result is popped off the expression stack.
|
03 |
High Byte. Place the high byte of the TOS (Top of Stack) on the stack.
|
04 |
Low Byte. Place the low byte of the TOS on the stack.
|
05 |
Bitwise NOT. Place the 1's complement of TOS on the stack.
|
06 |
Negate. Place the 2's complement of TOS on the stack.
|
07 |
Subtract. Subtract top two items on stack. Place result back on stack.
|
08 |
Addition. Add the top two items, placing result on stack.
|
09 |
Multiply (unsigned).
|
0A |
Divide (unsigned).
|
0B |
Modulo (unsigned remainder).
|
| |
|
B | X'42' | Arithmetic operation (define an external symbol whose value is to be pushed on the expression stack) |
C | X'43' | Arithmetic operation (field base + offset) |
|
The following special items are followed by a value field and a name field:
|
0101 |
Define common size.
The value field determines the amount of memory reserved for the common block described in the name field.
The first size allocated to a given block must be larger than or equal to any subsequent definitions for that block in other modules being linked.
|
0110 |
Chain external.
The value field contains the head of a chain that ends with an absolute 0.
Each element of the chain is replaced with the value of the external symbol described in the name field.
[used by EXTRN etc]
|
0111 |
Define entry point.
The value of the symbol in the name field is defined by the value field.
[PUBLIC definition]
|
The following special items are followed by a value field only:
|
1000 |
External minus offset.
Used by JP and CALL instructions for external references.
|
1001 |
External plus offset.
The following two bytes in the current segment must be offset by the value of the value field after all chains have been processed.
|
1010 |
Define data size.
The value field contains the number of bytes in the data segment of the current module.
|
1011 |
Set location counter.
Set the location counter to the value determined by the value field.
|
1100 |
Chain address.
The value field contains the head of a chain that ends with an absolute 0.
Each element of the chain is replaced with the current value of the location counter.
|
1101 |
Define program size.
The value field contains the number of bytes in the program segment of the current module.
|
1110 |
End module.
Defines the end of the current module.
If the value field contains a value other than absolute 0, it is used as the start address for the module being linked. That is, the current module is the main module.
The next item in the file starts at the next byte boundary.
|
1111 |
End file;
has no value field or name field.
This item follows the end module item in the last module in the file.
|