Program Structure
Expressions
base register, needs only 11 bits for the remainder of the address. The Assembler provides special operators, called field selectors, that extract the appropriate bits from the result of an expression. With the field selectors L' and R', the previous example can be recoded as follows:
| LDIL | L'START,%r1 | ;put left part into r1 | |
| LDW | R'START(%r1),%r2 | ;add r1 and right part | |
| The field selectors are always applied to the final result of the | |||
| expression. They cannot be used in the interior of an expression. | |||
| “Available Field Selectors” on page | 31 shows all the available field | ||
| selectors and their meanings. |
| ||
Table | Available Field Selectors |
| ||
|
|
|
|
|
| Field |
|
| Meaning |
| Selector |
|
| |
|
|
|
| |
|
|
|
|
|
| F' or F% |
| Full 32 bits (default). |
|
|
|
|
| |
| L' or L% |
| ||
|
|
|
|
|
| R' or R% |
|
| |
|
|
|
| |
| LS' or |
| ||
| LS% |
| 2048. |
|
|
|
|
| |
| RS' or |
| ||
| RS% |
|
|
|
|
|
|
| |
| LD' or |
| ||
| LD% |
| multiple of 2048. |
|
|
|
|
| |
| RD' or |
| ||
| RD% |
|
|
|
|
|
|
| |
| LR' or |
| L% value with constant rounded to nearest multiple of | |
| LR% |
| 8192. |
|
|
|
|
| |
| RR' or |
| R% value with constant rounded to nearest multiple of | |
| RR% |
| 8192, plus the difference of the constant and the rounded | |
|
|
| constant. |
|
|
|
|
| |
| T' or T% |
| F% value offset of data linkage table slots from linkage | |
|
|
| table pointer. In | |
|
|
| %r19. In | |
|
|
|
|
|
Chapter 2 | 31 |