HLASM Language Reference

HLASM Language Reference HLASM Language Reference

faculty.cs.niu.edu
from faculty.cs.niu.edu More from this publisher
22.02.2015 Views

| B2C('111111') has value '3' | B2C('111111111') has value '1' | B2C('') has value 'n' (EBCDIC null character) | B2C('111') has value 'nj' | B2C('') has value 'nn' (two EBCDIC nulls) | B2C('') has value '' (null string) | B2D | Format: Function-invocation | Operands: Character | Output: B2D('bitstring') converts a bit-string argument of at most 32 '' | and '1' characters to one to ten decimal characters preceded by a plus or | minus sign, representing the value of the argument. Null arguments return | '+'. | Examples | B2D('') has value '+' | B2D('111') has value '+145' | B2D('11111') has value '+241' | B2D('1111111111111111111111111111111') has value '+2147483647' | B2D('11111111111111111111111111111') has value '-15' | B2X | Format: Function-invocation | Operands: Character | Output: B2X('bitstring') converts the bit-string argument to hexadecimal | characters representing the same bit pattern. Null arguments return a null | string. | If needed, the argument string is padded internally on the left with zeros so | that its length is a multiple of four. | The operand must contain only ones and zeros. Any other value causes the | message ASMA214E to be generated. | Examples | B2X('') has value '' (null string) | B2X('') has value '' | B2X('111') has value '91' | B2X('11111') has value 'F1' | B2X('1111111') has value '3F1' BYTE Format: Logical-expression, function-invocation Operands: Arithmetic Output: BYTE(aexpr) or (BYTE aexpr) returns a one-character EBCDIC character expression in which the binary value of the character is specified by the arithmetic argument. The argument must have a value between 0 and 255, inclusive. This function might be used to introduce characters which are not on the keyboard. Examples 376 HLASM V1R5 Language Reference

| C2B BYTE() BYTE(97) BYTE(129) | Format: Function-invocation | Operands: Character has value 'n' (EBCDIC null character) has value '/' has value 'a' | Output: C2B('charstring') converts the character argument to a string of '' | and '1' characters representing the same bit pattern. Null arguments return | a null string. | If the result is not too long, the length of the result is eight times the length of | the 'charstring' argument. | Examples | C2B('') has value '' | C2B('n') has value '' | C2B(' ') has value '1' | C2B('1') has value '11111' | C2B('1234') has value '111111111111111111111' | C2D | Format: Function-invocation | Operands: Character | Output: C2D('charstring') converts a character-string argument of at most | four characters to one to ten decimal characters preceded by a plus or minus | sign, representing the numeric value of the argument. Null arguments return | '+'. | Examples | C2D('') has value '+' | C2D('nj') has value '+145' | C2D('1') has value '+241' | C2D('') has value '-2526451 | C2X | Format: Function-invocation | Operands: Character | Output: C2X('charstring') converts the character-string argument to | hexadecimal characters representing the same bit pattern. Null arguments | return a null string. | If the result is not too long, the length of the result is two times the length of | the 'charstring' argument. | Examples | C2X('') has value '' | C2X('n') has value '' | C2X('1') has value 'F1' | C2X('a') has value '81' | C2X('1234567R') has value 'F1F2F3F4F5F6F7D9' | D2B | Format: Function-invocation | Operands: Character Chapter 9. How to Write Conditional Assembly Instructions 377

| B2C('111111') has value '3'<br />

| B2C('111111111') has value '1'<br />

| B2C('') has value 'n' (EBCDIC null character)<br />

| B2C('111') has value 'nj'<br />

| B2C('') has value 'nn' (two EBCDIC nulls)<br />

| B2C('') has value '' (null string)<br />

| B2D<br />

| Format: Function-invocation<br />

| Operands: Character<br />

| Output: B2D('bitstring') converts a bit-string argument of at most 32 ''<br />

| and '1' characters to one to ten decimal characters preceded by a plus or<br />

| minus sign, representing the value of the argument. Null arguments return<br />

| '+'.<br />

| Examples<br />

| B2D('') has value '+'<br />

| B2D('111') has value '+145'<br />

| B2D('11111') has value '+241'<br />

| B2D('1111111111111111111111111111111') has value '+2147483647'<br />

| B2D('11111111111111111111111111111') has value '-15'<br />

| B2X<br />

| Format: Function-invocation<br />

| Operands: Character<br />

| Output: B2X('bitstring') converts the bit-string argument to hexadecimal<br />

| characters representing the same bit pattern. Null arguments return a null<br />

| string.<br />

| If needed, the argument string is padded internally on the left with zeros so<br />

| that its length is a multiple of four.<br />

| The operand must contain only ones and zeros. Any other value causes the<br />

| message ASMA214E to be generated.<br />

| Examples<br />

| B2X('') has value '' (null string)<br />

| B2X('') has value ''<br />

| B2X('111') has value '91'<br />

| B2X('11111') has value 'F1'<br />

| B2X('1111111') has value '3F1'<br />

BYTE<br />

Format: Logical-expression, function-invocation<br />

Operands: Arithmetic<br />

Output: BYTE(aexpr) or (BYTE aexpr) returns a one-character EBCDIC<br />

character expression in which the binary value of the character is specified by<br />

the arithmetic argument. The argument must have a value between 0 and<br />

255, inclusive.<br />

This function might be used to introduce characters which are not on the<br />

keyboard.<br />

Examples<br />

376 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!