Ordinary USING instruction
The ordinary USING instruction format specifies a base address and one or more base registers.
- sequence_symbol
- Is a sequence symbol.
- base
- Specifies a base address, which can be a relocatable or an absolute expression. The value of the expression is 0 - 231-1.
- end
- Specifies the end address, which can be a relocatable or an
absolute expression. The value of the expression is 0 - 231-1. The end address can exceed the
(base address + default range) without error. The end address
must be greater than the base and must have the same relocatability
attribute.
The resolvable range of a USING with an 'end' operand is
Thusbase,MIN(4095,end-1)
USING base,reg
is equivalent toUSING (base,base+4096),reg
. - lower
- Specifies a lower limit for the addressability range, which applies both for 12-bit displacements and for long displacements. The lower limit must have the same relocatability attribute as the base and can have any negative or positive offset from the location addressed by the first base register. An offset of x'80000000' is equivalent to no limit.
- upper
- Specifies an upper limit for the addressability range, which applies both for 12-bit displacement and for long displacements. This is one more than the maximum addressable byte address, than for the end limit. The upper limit must have the same relocatability attribute as the base and can have any negative or positive offset from the location addressed by the first base register. However, if a lower limit is present, the upper limit must be greater than the lower limit. An offset of x'80000000' is equivalent to no limit.
- base_register
- Is an absolute expression whose value represents general registers 0 through 15.
The default range is 4096 per base register.
The assembler assumes that the base register denoted by the first base_register operand contains the base address base at execution time. If present, the subsequent base_register operands represent registers that the assembler assumes contain the address values base+4096, base+8192, and so on.
For example:
USING BASE,9,10,11
has
the logical equivalent of:
USING BASE,9
USING BASE+4096,10
USING BASE+8192,11
In another example, the following statement:
USING *,12,13
tells the assembler to assume that the current value of the location counter is in general register 12 at execution time, and that the current value of the location counter, incremented by 4096, is in general register 13 at execution time.