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.

Examples of Coded Machine Instructions<br />

SI Format<br />

The operand fields of SI-format instructions designate immediate data and a virtual<br />

storage address.<br />

┌────────┬─────────┬────┬────────────┐<br />

│Op Code │ I │ B │ D │<br />

└────────┴─────────┴────┴────────────┘<br />

8 16 2 31<br />

Symbols used to represent immediate data (see HEX4 and TEN in the instructions<br />

labeled ALPHA2 and BETA1 below) are assumed to be equated to absolute values<br />

between 0 and 255.<br />

Symbols used to represent implicit addresses (see IMPLICIT and KEY in the<br />

instructions labeled BETA1 and BETA2) can be either relocatable or absolute.<br />

Symbols used to represent displacements (see DISPL4 in the instruction labeled<br />

ALPHA2 below) in explicit addresses are assumed to be equated to absolute values<br />

between 0 and 4095.<br />

Examples:<br />

ALPHA1 CLI 4(9),X'4'<br />

ALPHA2 CLI DISPL4(NINE),HEX4<br />

BETA1 CLI IMPLICIT,TEN<br />

BETA2 CLI KEY,C'E'<br />

When assembled, the object code for the instruction labeled ALPHA1, in<br />

hexadecimal, is:<br />

954928<br />

where<br />

95 is the operation code.<br />

4 is the immediate data.<br />

9 is the base register.<br />

28 is the displacement from the base register<br />

SS Format<br />

The operand fields and subfields of SS-format instructions designate two virtual<br />

storage addresses (coded as implicit addresses or explicit addresses) and,<br />

optionally, the explicit data lengths you want to include. However, note that, in the<br />

Shift and Round Decimal (SRP) instruction, a 4-bit immediate data field (see 3 in<br />

SRP instruction below), with a value between 0 and 9, is specified as a third<br />

operand.<br />

Chapter 4. Machine Instruction Statements 97

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

Saved successfully!

Ooh no, something went wrong!