22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Terms, Literals, and Expressions<br />

alignment and is the value assigned to the symbol, if present, in the name field<br />

of the statement.<br />

4. After assembling the instruction or constant, the assembler increments the<br />

location counter by the length of the assembled data to indicate the next<br />

available location.<br />

These rules are shown below:<br />

Location in<br />

Source<br />

Hexadecimal<br />

Statements<br />

4 DONE DC CL3'ABC'<br />

7 BEFORE EQU <br />

8 DURING DC F'2'<br />

C AFTER EQU <br />

1 NEXT DS D<br />

You can specify multiple location counters for each control section in a source<br />

module; for more details about the location counter setting in control sections, see<br />

“Location Counter Setting” on page 61.<br />

Maximum Location Counter Value: The assembler carries internal location<br />

| counter values as 4-byte (31-bit unsigned) values. When you specify the NOGOFF<br />

assembler option, the assembler uses only the low-order 3 bytes for the location<br />

| counter, and prints only the low-order 3 bytes in the assembly source and object<br />

| code listing if the LIST(121) option is active. All four bytes are displayed if the<br />

| LIST(133) option is active. In this case the maximum valid location counter value is<br />

2 24 −1.<br />

| When you specify the GOFF assembler option, the assembler requires<br />

| the LIST(133) option, and uses the entire 4-byte value for the location counter and<br />

prints the 4-byte value in the assembly listings. In this case the maximum valid<br />

location counter value is 2 31 −1.<br />

If the location counter exceeds its valid maximum value the assembler issues error<br />

message<br />

ASMA39S Location counter error<br />

Controlling the Location Counter Value: You can control the setting of the<br />

location counter in a particular control section by using the START or ORG<br />

instruction, described in Chapter 3, “Program Structures and Addressing” and<br />

Chapter 5, “Assembler Instruction Statements,” respectively. The counter affected<br />

by either of these assembler instructions is the counter for the control section in<br />

which they appear.<br />

Location Counter <strong>Reference</strong>: You can refer to the current value of the location<br />

counter at any place in a program by using an asterisk as a term in an operand.<br />

The asterisk is a relocatable term, specified according to the following rules:<br />

The asterisk can be specified only in the operands of:<br />

– Machine instructions<br />

– DC and DS instructions<br />

– EQU, ORG, and USING instructions<br />

Chapter 2. Coding and Structure 37

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

Saved successfully!

Ooh no, something went wrong!