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.

Examples of Coded Machine Instructions<br />

| If an offset is specified it may be specified as a relocatable expression or an<br />

| absolute value. If the offset is specified as a relocatable expression, the assembler<br />

| performs some checking and calculates the immediate value. If the offset is an<br />

| absolute expression the assembler issues warning message ASMA056W.<br />

| Examples:<br />

| ALPHA1 BRAS 14,A-B+C+1 where A, B and C are external symbols<br />

| ALPHA2 BRASL 14,A-B+C+1<br />

| BETA1 BRC 15,A-B+C+1<br />

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

| hexadecimal, is<br />

| A7F45<br />

| where:<br />

| A7.4 is the operation code<br />

| F is the condition code<br />

| 5 is the immediate data I2; a value of 5 decimal.<br />

| In addition GOFF Relocation Dictionary Data Items are generated for the external<br />

| symbols A, B and C.<br />

RR Format<br />

The operand fields of RR-format instructions designate two registers, with the<br />

following exceptions:<br />

In BCR branching instructions, when a 4-bit branching mask replaces the first<br />

register specification (see 8 in the instruction labeled GAMMA1 below)<br />

In SVC instructions, where an immediate value (between 0 and 255) replaces<br />

both registers (see 2 in the instruction labeled DELTA1 below)<br />

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

│Op Code │ R │ R │<br />

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

8 12 15<br />

Symbols used to represent registers in RR-format instructions (see INDEX and REG2<br />

in the instruction labeled ALPHA2 below) are assumed to be equated to absolute<br />

values between 0 and 15.<br />

Symbols used to represent immediate values in SVC instructions (see TEN in the<br />

instruction labeled DELTA2 below) are assumed to be equated to absolute values<br />

between 0 and 255.<br />

Examples:<br />

ALPHA1 LR 1,2<br />

ALPHA2 LR INDEX,REG2<br />

GAMMA1 BCR 8,12<br />

DELTA1 SVC 2<br />

DELTA2 SVC TEN<br />

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

hexadecimal, is:<br />

1812<br />

Chapter 4. Machine Instruction Statements 93

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

Saved successfully!

Ooh no, something went wrong!