11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

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

CNOP instructionTable 15 shows valid pairs of byte and word.Table 15. Valid CNOP valuesValuesSpecify0,4 Beginning of a word2,4 Middle of a word0,8 Beginning of a doubleword2,8 Second halfword of a doubleword4,8 Middle (third halfword) of a doubleword6,8 Fourth halfword of a doubleword0,16 Beginning of a quadword2,16 Second halfword of a quadword4,16 Third halfword of a quadword6,16 Fourth halfword of a quadword8,16 Fifth halfword of a quadword10,16 Sixth halfword of a quadword12,16 Seventh halfword of a quadword14,16 Eighth halfword of a quadwordFigure 16 shows the position in a doubleword that each of these pairs specifies.Note that both 0,4 and 2,4 specify two locations in a doubleword.┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│ Quadword │├────────────────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────┤│ Doubleword │ Doubleword │├─────────────────────────────────┬──────────────────────────────────┼─────────────────────────────────┬──────────────────────────────────┤│ Fullword │ Fullword │ Fullword │ Fullword │├───────────────┬─────────────────┼────────────────┬─────────────────┼───────────────┬─────────────────┼────────────────┬─────────────────┤│ Halfword │ Halfword │ Halfword │ Halfword │ Halfword │ Halfword │ Halfword │ Halfword │├───────┬───────┼────────┬────────┼────────┬───────┼────────┬────────┼───────┬───────┼────────┬────────┼────────┬───────┼────────┬────────┤│ Byte │ Byte │ Byte │ Byte │ Byte │ Byte │ Byte │ Byte │ Byte │ Byte │ Byte │ Byte │ Byte │ Byte │ Byte │ Byte │├───────┴───────┴────────┴────────┴────────┴───────┴────────┴────────┼───────┴───────┴────────┴────────┴────────┴───────┴────────┴────────┤│0,4 2,4 0,4 2,4 0,4 2,4 0,4 2,4 ││0,8 2,8 4,8 6,8 0,8 2,8 4,8 6,8 ││0,16 2,16 4,16 6,16 8,16 10,16 12,16 14,16 │└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘Figure 16. CNOP alignmentUse the CNOP instruction, for example, when you code the linkage to asubroutine, and you want to pass parameters to the subroutine in fieldsimmediately following the branch and link instructions. These parameters—forexample, channel command words—can require alignment on a specific boundary.The subroutine can then address the parameters you pass through the register withthe return address, as in the following example:CNOP 6,8LINK BALR 2,10CCW1,DATADR,X’48’,X’50’Assume that the location counter is aligned at a doubleword boundary. Then theCNOP instruction causes the following no-operations to be generated, thusaligning the BALR instruction at the last halfword in a doubleword as follows:BCR 0,0BC0,X’700’BALR 2,10LINK CCW 1,DATADR,X’48’,X’50’118 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>

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

Saved successfully!

Ooh no, something went wrong!