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

SIGNED Format: Logical-expression, function-invocation Operands: Arithmetic Output: SIGNED(aexpr) or (SIGNED aexpr) converts its arithmetic argument to a decimal character string representation of its value, with a leading minus sign if the argument is negative. Examples SIGNED(1) SIGNED(-1) | SYSATTRA | Format: Function-invocation | Operands: Character has value '1' has value '-1' Note: The SIGNED function creates properly signed values for display, whereas assigning a SETA value to a SETC variable produces only the magnitude of the SETA value. For example: &A SETA 1 &A has value 1 &C SETC '&A' &C has value '1' &A SETA -1 &A has value -1 &C SETC '&A' &C has value '1' (unsigned) | Output: SYSATTRA('symbol') returns the assembler-type value for the | specified symbol. | The 1 to 4 assembler type is returned, with trailing spaces removed. | Symbols without an assigned assembler type return null. | Examples | Given that symbol Sym1 has previously been assigned an assembler type of | GR, and variable symbol &SName has a value of SYM1, then: | SYSATTRA('Sym1') has value 'GR' | SYSATTRA('&Sname') has value 'GR' | SYSATTRP | Format: Function-invocation | Operands: Character | Output: SYSATTRP('symbol') returns the program-type value for the specified | symbol. | The 4 byte program type is returned. | Symbols without an assigned program type return null. | Examples | Given that symbol Sym1 has previously been assigned a program type of | “Box7,” and variable symbol &SName has a value of SYM1, then: | SYSATTRP('Sym1') has value 'Box7' | SYSATTRP('&SName') has value 'Box7' UPPER Format: Logical-expression, function-invocation Operands: Character 380 HLASM V1R5 Language Reference

| X2B Output: UPPER('cexpr') or (UPPER 'cexpr') converts the alphabetic characters a-z in the argument to upper case, A-Z. Null arguments return a null string. Examples UPPER('aBcDefG') | Format: Function-invocation | Operands: Character has value 'ABCDEFG' | Output: X2B('hexstring') converts the value of its argument string of | hexadecimal characters to a character string containing only zero ('') and | one ('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 four times the length of | the 'hexstring' argument. | The operand must contain only hexadecimal digits. Any other value causes | the message ASMA214E to be generated. | Examples | X2B('') has value '' (null string) | X2B('') has value '' | X2B('1') has value '1' | X2B('F3') has value '111111' | X2B('F3') has value '111111' | X2C | Format: Function-invocation | Operands: Character | Output: X2C('hexstring') converts the hexstring argument to characters | representing the same bit pattern. Null arguments return a null string. | If needed, the argument string is padded internally on the left with a zero | character so that its length is a multiple of two. | The operand must contain only hexadecimal digits. Any other value causes | the message ASMA214E to be generated. | Examples | X2C('') has value '' (null string) | X2C('F3') has value '3' | X2C('') has value 'n' (EBCDIC null character) | X2C('F1F2F3F4F5') has value '12345' | X2C('F1') has value 'nn1' | X2D | Format: Function-invocation | Operands: Character | Output: X2D('hexstring') converts its argument string of at most eight | hexadecimal characters to one to ten decimal characters preceded by a plus | or minus sign, representing the value of the argument. Null arguments return | '+'. For example: Chapter 9. How to Write Conditional Assembly Instructions 381

SIGNED<br />

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

Operands:<br />

Arithmetic<br />

Output: SIGNED(aexpr) or (SIGNED aexpr) converts its arithmetic argument to<br />

a decimal character string representation of its value, with a leading minus<br />

sign if the argument is negative.<br />

Examples<br />

SIGNED(1)<br />

SIGNED(-1)<br />

| SYSATTRA<br />

| Format: Function-invocation<br />

| Operands: Character<br />

has value '1'<br />

has value '-1'<br />

Note: The SIGNED function creates properly signed values for display,<br />

whereas assigning a SETA value to a SETC variable produces only the<br />

magnitude of the SETA value. For example:<br />

&A SETA 1 &A has value 1<br />

&C SETC '&A' &C has value '1'<br />

&A SETA -1 &A has value -1<br />

&C SETC '&A' &C has value '1' (unsigned)<br />

| Output: SYSATTRA('symbol') returns the assembler-type value for the<br />

| specified symbol.<br />

| The 1 to 4 assembler type is returned, with trailing spaces removed.<br />

| Symbols without an assigned assembler type return null.<br />

| Examples<br />

| Given that symbol Sym1 has previously been assigned an assembler type of<br />

| GR, and variable symbol &SName has a value of SYM1, then:<br />

| SYSATTRA('Sym1') has value 'GR'<br />

| SYSATTRA('&Sname') has value 'GR'<br />

| SYSATTRP<br />

| Format: Function-invocation<br />

| Operands: Character<br />

| Output: SYSATTRP('symbol') returns the program-type value for the specified<br />

| symbol.<br />

| The 4 byte program type is returned.<br />

| Symbols without an assigned program type return null.<br />

| Examples<br />

| Given that symbol Sym1 has previously been assigned a program type of<br />

| “Box7,” and variable symbol &SName has a value of SYM1, then:<br />

| SYSATTRP('Sym1') has value 'Box7'<br />

| SYSATTRP('&SName') has value 'Box7'<br />

UPPER<br />

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

Operands: Character<br />

380 <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!