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.

ANOP Instruction<br />

the next sequential prototype instruction after the call; that is, it continues<br />

processing at the next outer level of nested macros.<br />

The assembler halves the ACTR counter value when it encounters serious syntax<br />

errors in conditional assembly instructions.<br />

ANOP Instruction<br />

You can specify a sequence symbol in the name field of an ANOP instruction, and<br />

use the symbol as a label for branching purposes.<br />

The ANOP instruction carries out no operation itself, but you can use it to allow<br />

conditional assembly to resume assembly or conditional generation at an instruction<br />

that does not have a sequence symbol in its name field. For example, if you<br />

wanted to branch to a SETA, SETB, or SETC assignment instruction, which<br />

requires a variable symbol in the name field, you could insert a labeled ANOP<br />

instruction immediately before the assignment instruction. By branching to the<br />

ANOP instruction with an AIF or AGO instruction, you would, in effect, be branching<br />

to the assignment instruction.<br />

►►──sequence_symbol──ANOP──────────────────────────────────────────►◄<br />

sequence_symbol<br />

is a sequence symbol.<br />

No operation is carried out by an ANOP instruction. Instead, if a branch is taken to<br />

the ANOP instruction, the assembler processes the next sequential instruction.<br />

Example:<br />

MACRO<br />

&NAME MOVE &T,&F<br />

LCLC<br />

&TYPE<br />

AIF (T'&T EQ 'F').FTYPE Statement 1<br />

&TYPE SETC 'E' Statement 2<br />

.FTYPE ANOP Statement 3<br />

&NAME ST&TYPE 2,SAVEAREA Statement 4<br />

L&TYPE<br />

2,&F<br />

ST&TYPE 2,&T<br />

L&TYPE<br />

2,SAVEAREA<br />

MEND<br />

Statement 1 determines if the type attribute of the first macro instruction operand is<br />

the letter F. If the type attribute is not the letter F, Statement 2 is the next<br />

statement processed by the assembler. If the type attribute is the letter F,<br />

Statement 4 should be processed next. However, because there is a variable<br />

symbol (&NAME) in the name field of Statement 4, the required sequence symbol<br />

(.FTYPE) cannot be placed in the name field. Therefore, an ANOP instruction<br />

(Statement 3) must be placed before Statement 4.<br />

Then, if the type attribute of the first operand is the letter F, the next statement<br />

processed by the assembler is the statement named by sequence symbol .FTYPE.<br />

The value of &TYPE retains its initial null character value because the SETC<br />

instruction is not processed. Because .FTYPE names an ANOP instruction, the next<br />

Chapter 9. How to Write Conditional Assembly Instructions 395

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

Saved successfully!

Ooh no, something went wrong!