11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

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

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

AGO instruction,►►sequence_symbolAGO(arithmetic_expression) ▼ sequence_symbol ►◄sequence_symbolis a sequence symbol.arithmetic_expressionis an arithmetic expression the assembler evaluates to k, where k lies between 1and n (the number of occurrences of sequence_symbol in the operand field)inclusive. The assembler branches to the k-th sequence symbol in the list. If k isoutside that range, no branch is taken.In the following example, control passes to the statement at .THIRD if &I= 3.Control passes through to the statement following the AGO if &I is less than 1 orgreater than 4.Cont.AGO (&I).FIRST,.SECOND, X.THIRD,.FOURTHAlternative format for AGO instructionThe alternative statement format is allowed for computed AGO instructions. Theabove example could be coded as follows:Cont.AGO (&I).FIRST, X.SECOND,X.THIRD,X.FOURTHAGOB—synonym of the AGO instructionFor compatibility with some earlier assemblers, High Level Assembler supports theAGOB symbolic operation code as a synonym of the AGO instruction. However,you should not use the AGOB instruction in new applications as support for itmight be removed in the future.ACTRinstructionThe ACTR instruction sets a conditional assembly branch counter either within amacro definition or in open code. The ACTR instruction can appear anywhere inopen code or within a macro definition.|Each time the assembler processes a successful AIF or AGO branching instructionin a macro definition or in open code, the branch counter for that part of theprogram is decremented by one. When the number of conditional assemblybranches reaches the value assigned to the branch counter by the ACTRinstruction, the assembler exits from the macro definition or stops processingstatements in open code.By using the ACTR instruction, you avoid excessive looping during conditionalassembly processing.Chapter 9. How to write conditional assembly instructions 387

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

Saved successfully!

Ooh no, something went wrong!