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

Processing Statements Processing Statements Conditional Assembly Instructions Conditional assembly instructions let you determine at conditional assembly time the content of the generated statements and the sequence in which they are generated. The instructions and their functions are listed below: Conditional Assembly GBLA, GBLB, GBLC LCLA, LCLB, LCLC SETA, SETB, SETC SETAF, SETCF ACTR AGO AIF ANOP Operation Done Declaration of variable symbols (global-scope and local-scope SET symbols) and setting of default initial values Assignment of values to variable symbols (SET symbols) External function assignment of values to variable symbols (SET symbols) Setting loop counter Unconditional branch Conditional branch (based on logical test) Pass control to next sequential instruction (no operation) Conditional assembly instructions can be used both inside macro definitions and in open code. They are described in Chapter 9, “How to Write Conditional Assembly Instructions.” Inner Macro Instructions Macro instructions can be nested inside macro definitions, allowing you to call other macros from within your own definition. Other Conditional Assembly Instructions Several additional instructions can help you write your macro definitions. The instructions and their functions are listed below: Inner Macro Instruction AEJECT AINSERT AREAD ASPACE COPY MEXIT Operation Done Skip to next page Insert statement into input stream Assign an arbitrary character string to a variable symbol (SETC symbol) Insert one or more blank lines in listing Copy the source statements from a source language library member. Exit from the macro definition 256 HLASM V1R5 Language Reference

AEJECT Instruction AEJECT Instruction Use the AEJECT instruction to stop the printing of the assembler listing of your macro definition on the current page, and continue the printing on the next page. ►►──┬─────────────────┬──AEJECT────────────────────────────────────►◄ └─sequence_symbol─┘ sequence_symbol is a sequence symbol. The AEJECT instruction causes the next line of the assembly listing of your macro definition to be printed at the top of a new page. If the line before the AEJECT statement appears at the bottom of a page, the AEJECT statement has no effect. An AEJECT instruction immediately following another AEJECT instruction causes a blank page in the listing of the macro definition. Notes: 1. The AEJECT instruction can only be used inside a macro definition. 2. The AEJECT instruction itself is not printed in the listing. 3. The AEJECT instruction does not affect the listing of statements generated when the macro is called. AINSERT Instruction The AINSERT instruction, inside macro definitions, harnesses the power of macros to generate source statements, for instance, using variable substitution. Generated statements are queued in a special buffer and read after the macro generator finishes. The specifications for the AINSERT instruction, which can also be used in open code, are described in “AINSERT Instruction” on page 108. AREAD Instruction The AREAD instruction assigns an arbitrary character string value to a SETC symbol. The AREAD instruction has two formats. The first format lets you assign to a SETC symbol the character string value of a statement that is placed immediately after a macro instruction. The AREAD instruction can only be used inside macro definitions. Assign Character String Value ►►──SETC_symbol──AREAD──┬─────────┬────────────────────────────────►◄ ├─NOPRINT─┤ └─NOSTMT──┘ The second format of the AREAD instruction assigns to a SETC symbol a character string containing the local time. Chapter 7. How to Specify Macro Definitions 257

Processing Statements<br />

Processing Statements<br />

Conditional Assembly Instructions<br />

Conditional assembly instructions let you determine at conditional assembly time<br />

the content of the generated statements and the sequence in which they are<br />

generated. The instructions and their functions are listed below:<br />

Conditional Assembly<br />

GBLA, GBLB, GBLC<br />

LCLA, LCLB, LCLC<br />

SETA, SETB, SETC<br />

SETAF, SETCF<br />

ACTR<br />

AGO<br />

AIF<br />

ANOP<br />

Operation Done<br />

Declaration of variable symbols (global-scope and local-scope<br />

SET symbols) and setting of default initial values<br />

Assignment of values to variable symbols (SET symbols)<br />

External function assignment of values to variable symbols<br />

(SET symbols)<br />

Setting loop counter<br />

Unconditional branch<br />

Conditional branch (based on logical test)<br />

Pass control to next sequential instruction (no operation)<br />

Conditional assembly instructions can be used both inside macro definitions and in<br />

open code. They are described in Chapter 9, “How to Write Conditional Assembly<br />

Instructions.”<br />

Inner Macro Instructions<br />

Macro instructions can be nested inside macro definitions, allowing you to call other<br />

macros from within your own definition.<br />

Other Conditional Assembly Instructions<br />

Several additional instructions can help you write your macro definitions. The<br />

instructions and their functions are listed below:<br />

Inner Macro Instruction<br />

AEJECT<br />

AINSERT<br />

AREAD<br />

ASPACE<br />

COPY<br />

MEXIT<br />

Operation Done<br />

Skip to next page<br />

Insert statement into input stream<br />

Assign an arbitrary character string to a variable symbol<br />

(SETC symbol)<br />

Insert one or more blank lines in listing<br />

Copy the source statements from a source language<br />

library member.<br />

Exit from the macro definition<br />

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