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.

SETA instruction|||||ISSYM(’Abcd_1234’) returns 1ISSYM(’_Abcd1234’) returns 1ISSYM(’##@$_’) returns 1ISSYM(’1234_Abcd’) returns 0 (invalid initial character)ISSYM(’’) indicates an error conditionNOT Format: Logical-expressionOperands: ArithmeticOutput: (NOT aexp) provides the ones complement of the value containedor evaluated in the operand.ExampleAfter the following statements &VAR contains the arithmetic value −11.Name Operation Operand&OP1 SETA 10&VAR SETA (NOT &OP1)OR Format: Logical-expressionOperands: ArithmeticOutput: Each bit position in the result is set to 1 if the corresponding bitpositions in one or both operands contains a 1, otherwise the result bit isset to 0.ExampleAfter the following statements &VAR contains the arithmetic value +10.Name Operation Operand&OP1 SETA 10&OP2 SETA 2&VAR SETA (&OP1 OR &OP2)SLA Format: Logical-expressionOperands: ArithmeticOutput: The 31-bit numeric part of the signed first operand is shifted leftthe number of bits specified in the rightmost six bits of the secondoperand. The sign of the first operand remains unchanged. Zeros are usedto fill the vacated bit positions on the right.ExampleAfter the following statements &VAR contains the arithmetic value +8.Name Operation Operand&OP1 SETA 2&OP2 SETA 2&VAR SETA (&OP1 SLA &OP2)SLL Format: Logical-expressionOperands: ArithmeticOutput: (aexp1 SLL aexp2) shifts the 32-bit first operand left the numberof bits specified in the rightmost six bits of the second operand. Bits shiftedout of bit position 0 are lost. Zeros are used to fill the vacated bit positionson the right.ExampleChapter 9. How to write conditional assembly instructions 353

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

Saved successfully!

Ooh no, something went wrong!