HLASM Language Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Statement formats

HLASM Language Reference
SC26-4940-06

Machine instructions are assembled into 2, 4, or 6 bytes of object code according to the format of each instruction. Machine instruction formats include the following (ordered by length attribute):
Length
Attribute Basic Formats
2
RR
4
RI, RS, RSI, RX, SI
6
SS

See the z/Architecture Principles of Operation information. for complete details about machine instruction formats. See also Examples of coded machine instructions.

When you code machine instructions, you use symbolic formats that correspond to the actual machine language formats. Within each basic format, you can also code variations of the symbolic representation, divided into groups according to the basic formats shown in Examples of coded machine instructions.

The assembler converts only the operation code and the operand entries of the assembler language statement into object code. The assembler assigns to a name entry symbol the value of the address of the first byte of the assembled instruction. When you use this same symbol in the operand of an assembler language statement, the assembler uses this address value in converting the symbolic operand into its object code form. The length attribute assigned to the symbol depends on the basic machine language format of the instruction in which the symbol appears as a name entry.

A remarks entry is not converted into object code.

An example of a typical assembler language statement follows:
LABEL    L               4,256(5,10)         LOAD INTO REG4
where:
LABEL
Is the name entry
L
Is the operation code mnemonic (converted to hex 58)
4
Is the register operand (converted to hex 4)
256(5,10)
Are the storage operand entries (converted to hex 5A100)
LOAD INTO REG4
Are remarks not converted into object code
The object code of the assembled instruction, in hexadecimal, is:
5845A100 (4 bytes in RX format)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014