22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

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

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

SETA Instruction<br />

| Figure 99 (Page 3 of 3). Summary of Built-In Functions<br />

| Function Type<br />

L-E F-I Result Operands Page<br />

| X2C Representation conversion<br />

√ C C 381<br />

| X2D Representation conversion<br />

√ C C 381<br />

| XOR Logical<br />

√<br />

A<br />

A 358<br />

| XOR Logical<br />

√<br />

B<br />

B 367<br />

| XOR NOT Logical<br />

√<br />

B<br />

B 367<br />

| Notes:<br />

| 1. If a √ is in this column, the function is available in the “logical-expression” format.<br />

| 2. If a √ is in this column, the function is available in the “function-invocation” format.<br />

| 3. Possible values in these columns are:<br />

| A Arithmetic<br />

| B Binary<br />

| C Character<br />

| 4. For these functions, the maximum length of the operand (and output) is the maximum<br />

| string length that the assembler supports, currently 1024.<br />

Arithmetic (SETA) Expressions<br />

Figure 100 shows how arithmetic expressions can be used.<br />

Figure 100. Use of Arithmetic Expressions<br />

Used in Used as Example<br />

SETA instruction Operand &A1 SETA &A1+2<br />

AIF or SETB instruction<br />

Term in arithmetic<br />

relation<br />

AIF<br />

(&A1 GT 3).A<br />

Subscripted SET symbols Subscript &ASYM(&A+1−&C)<br />

Substring notation Subscript 'STRING'(&A2,&A−1)<br />

Sublist notation Subscript Given sublist (A,B,C,D)<br />

named &PARAM,<br />

if &A=1 then &PARAM(&A+1)=B<br />

&SYSLIST Subscript &SYSLIST(&M+1,&N−2)<br />

&SYSLIST(N'&SYSLIST)<br />

SETC instruction<br />

Character string in<br />

operand<br />

Given &C SETC '5−1&A' ▌1▐<br />

if &A=1 then<br />

&C=5−11 ▌2▐<br />

Given &D SETC '5−1&A' ▌1▐<br />

if &A=−1 then<br />

&D=5−11▌3▐<br />

Built-in functions Operand &VAR SETA (NOT &OP1) &VAR<br />

SETA BYTE(64)<br />

When an arithmetic expression is used in the operand field of a SETC instruction<br />

(see ▌1▐ in Figure 100), the assembler assigns the character value representing<br />

the arithmetic expression to the SETC symbol, after substituting values (see ▌2▐ in<br />

Figure 100) into any variable symbols. It does not evaluate the arithmetic<br />

expression. The mathematical sign (+ or −) is not included in the substituted value<br />

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