Literals
You can use literals as operands in order to introduce data into
your program. The literal is a special type of relocatable
term. It behaves like a symbol in that it represents data. However,
it is a special kind of term because it also is used to define the
constant specified by the literal. This is convenient because:
- The data you enter as numbers for computation, addresses, or messages to be printed is visible in the instruction in which the literal appears.
- You avoid the added effort of defining constants elsewhere in your source module and then using their symbolic names in machine instruction operands.
The assembler assembles the data item specified in a literal into a literal pool (See Literal pool). It then assembles the address of this literal data item in the pool into the object code of the instruction that contains the literal specification. Thus, the assembler saves you a programming step by storing your literal data for you. The assembler also organizes literal pools efficiently, so that the literal data is aligned on the correct boundary alignment and occupies a minimum amount of space.