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.

Substring notationIf needed, the argument string is padded internally on the left with zerosso that its length is a multiple of four.The operand must contain only ones and zeros. Any other value causes themessage ASMA214E to be generated.ExamplesB2X(’’) has value ’’ (null string)B2X(’00000’) has value ’00’B2X(’0000010010001’) has value ’0091’B2X(’11110001’) has value ’F1’B2X(’1111110001’) has value ’3F1’BYTE Format: Logical-expression, function-invocationOperands: ArithmeticOutput: BYTE(aexpr) or (BYTE aexpr) returns a one-character EBCDICcharacter expression in which the binary value of the character is specifiedby the arithmetic argument. The argument must have a value between 0and 255, inclusive.This function might be used to introduce characters which are not on thekeyboard.ExamplesBYTE(0) has value ’n’ (EBCDIC null character)BYTE(97) has value ’/’BYTE(129) has value ’a’C2B Format: Function-invocationOperands: CharacterOutput: C2B(’charstring’) converts the character argument to a string of’0’ and ’1’ characters representing the same bit pattern. Null argumentsreturn a null string.If the result is not too long, the length of the result is eight times thelength of the ’charstring’ argument.ExamplesC2B(’’) has value ’’C2B(’n’) has value ’00000000’C2B(’ ’) has value ’01000000’C2B(’1’) has value ’11110001’C2B(’1234’) has value ’11110001111100101111001111110100’C2D Format: Function-invocationOperands: CharacterOutput: C2D(’charstring’) converts a character-string argument of at mostfour characters to one to ten decimal characters preceded by a plus orminus sign, representing the numeric value of the argument. Nullarguments return ’+0’.ExamplesC2D(’’) has value ’+0’C2D(’nj’) has value ’+145’C2D(’1’) has value ’+241’C2D(’0000’) has value ’-252645136Chapter 9. How to write conditional assembly instructions 371

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

Saved successfully!

Ooh no, something went wrong!