22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

USING Instruction<br />

Base Registers for Absolute Addresses<br />

Absolute addresses used in a source module must also be made addressable.<br />

Absolute addresses require a base register other than the base register assigned to<br />

relocatable addresses (as described above).<br />

However, the assembler does not need a USING instruction to convert absolute<br />

implicit addresses in the range 0 through 4095 to their explicit form. The assembler<br />

uses register 0 as a base register. Displacements are computed from the base<br />

address 0, because the assembler assumes that a base or index of 0 implies that a<br />

zero quantity is to be used in forming the address, regardless of the contents of<br />

register 0. The USING domain for this automatic base register assignment is the<br />

entire source module.<br />

| If a register is specified with base address zero, the assembler will use it in<br />

| preference to the default use of register zero. For example:<br />

| USING 3,<br />

| LA 7,5<br />

| generates the instruction X'41703005'; in the absence of the USING statement, the<br />

| generated instruction would be X'41700005'.<br />

For absolute implicit addresses greater than 4095 and in the absence of<br />

long-displacement instructions, a USING instruction must be specified according to<br />

the following:<br />

With a base address representing an absolute expression<br />

With a base register that has not been assigned by a USING instruction in<br />

which a relocatable base address is specified<br />

This base register must be loaded with the base address specified.<br />

Ordinary USING Instruction<br />

The ordinary USING instruction format specifies a base address and one or more<br />

base registers.<br />

Ordinary USING<br />

►►──┬─────────────────┬──USING──┬─base─────────────┬────────────────►<br />

└─sequence_symbol─┘<br />

└─(base─┬────── ┬─)<br />

─┘<br />

└─,end─┘<br />

┌<br />

──────────────┐<br />

►─── ▼ ,base_register┴────────────────────────────────────────────────►◄<br />

sequence_symbol<br />

is a sequence symbol.<br />

base<br />

specifies a base address, which can be a relocatable or an absolute<br />

expression. The value of the expression must lie between 0 and 2 31 −1.<br />

end<br />

specifies the end address, which can be a relocatable or an absolute<br />

expression. The value of the expression must lie between 0 and 2 31 −1. The<br />

end address may exceed the (base address + default range) without error. The<br />

220 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!