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.

ORG Instruction<br />

3. Redefine the data (see ▌3▐ in Figure 57) to be assembled into that location.<br />

4. After repeating the first three steps (see ▌4▐ in Figure 57) until your translate<br />

table is complete, use an ORG instruction with a null operand field to alter the<br />

location counter. The counter value then indicates the next available location<br />

(see ▌5▐ in Figure 57) in the current control section (after the end of the<br />

translate table).<br />

Both the assembled object code for the whole table filled with zeros, and the object<br />

code for the portions of the table you redefined, are printed in the program listings.<br />

However, the data defined later is loaded over the previously defined zeros and<br />

becomes part of your object program, instead of the zeros.<br />

That is, the ORG instruction can cause the location counter to be set to any part of<br />

a control section, even the middle of an instruction, into which you can assemble<br />

data. It can also cause the location counter to be set to the next available location<br />

so that your program can be assembled sequentially.<br />

Source Module │ Object Code<br />

─────────────────────────────────────────────────────┼────────────────────────<br />

│<br />

FIRST START │<br />

. │<br />

. │<br />

▌1▐ TABLE DC XL256'' │ TABLE (in Hex)<br />

▌2▐ ORG TABLE+ │ + ┌────┐<br />

┌ DC C'' ▌3▐ │ │ F │<br />

│ DC C'1' │ │ F1 │<br />

│ . │ │ . │<br />

│ . │ │ . │<br />

│ ORG TABLE+13 │ +13 │ . │<br />

│ DC C'D' │ │ C4 │<br />

│ DC C'E' │ │ C5 │<br />

│ . │ │ . │<br />

│ . │ │ . │<br />

▌4▐ ─┤ ORG TABLE+C'D' │ │ . │<br />

│ DC AL1(13) │ +196 │ 13 │<br />

│ DC AL1(14) │ │ 14 │<br />

│ . │ │ . │<br />

│ . │ │ . │<br />

│ ORG TABLE+C'' │ +24 │ . │<br />

│ DC AL1() │ │ │<br />

│ DC AL1(1) │ │ 1 │<br />

│ . │ │ │<br />

└ . │ +255 └────┘<br />

ORG<br />

│<br />

▌5▐ GOON DS H │<br />

▲ . │<br />

TABLE+256 . │<br />

TR INPUT,TABLE │<br />

. │<br />

. │<br />

INPUT DS CL2 │<br />

. │<br />

Figure 57. Building a Translate Table<br />

. │<br />

END<br />

│<br />

Chapter 5. Assembler Instruction Statements 203

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

Saved successfully!

Ooh no, something went wrong!