11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SETA instructionAfter the following statements &VAR contains the arithmetic value +40.Name Operation Operand&OP1 SETA 10&OP2 SETA 2&VAR SETA (&OP1 SLL &OP2)SRA Format: Logical-expressionOperands: ArithmeticOutput: The 31-bit numeric part of the signed first operand is shifted rightthe number of bits specified in the rightmost six bits of the secondoperand. The sign of the first operand remains unchanged. Bits shifted outof bit position 31 are lost. Bits equal to the sign are used to fill the vacatedbit positions on the left.ExamplesAfter the following statements &VAR contains the arithmetic value +2.Name Operation Operand&OP1 SETA 10&OP2 SETA 2&VAR SETA (&OP1 SRA &OP2)After the following statements &VAR contains the arithmetic value −1.Name Operation Operand&OP1 SETA -344&OP2 SETA 40&VAR SETA (&OP1 SRA &OP2)Compare this result with the result in the second example under SRLbelow.SRL Format: Logical-expressionOperands: ArithmeticOutput: The 32-bit first operand is shifted right the number of bitsspecified in the rightmost six bits of the second operand. Bits shifted out ofbit position 31 are lost. Zeros are used to fill the vacated bit positions onthe left.ExamplesAfter the following statements &VAR contains the arithmetic value +2.Name Operation Operand&OP1 SETA 10&OP2 SETA 2&VAR SETA (&OP1 SRL &OP2)After the following statements &VAR contains the arithmetic value 0.Name Operation Operand&OP1 SETA -344&OP2 SETA 40&VAR SETA (&OP1 SRL &OP2)X2A Format: Function-invocationOperands: Character354 <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!