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

COPY Instruction sequence_symbol is a sequence symbol. number_of_lines is a non-negative decimal integer that specifies the number of lines to be left blank. If number_of_lines is omitted, one line is left blank. If number_of_lines has a value greater than the number of lines remaining on the listing page, the instruction has the same effect as an AEJECT statement. Notes: 1. The ASPACE instruction can only be used inside a macro definition. 2. The ASPACE instruction itself is not printed in the listing. 3. The ASPACE instruction does not affect the listing of statements generated when the macro is called. COPY Instruction The COPY instruction, inside macro definitions, lets you copy into the macro definition any sequence of statements allowed in the body of a macro definition. These statements become part of the body of the macro before macro processing takes place. You can also use the COPY instruction to copy complete macro definitions into a source module. The specifications for the COPY instruction, which can also be used in open code, are described in “COPY Instruction” on page 122. MEXIT Instruction The MEXIT instruction provides an exit for the assembler from any point in the body of a macro definition. The MEND instruction provides an exit only from the end of a macro definition (see “MEND Statement” on page 245 for details). The MEXIT instruction statement can be used only inside macro definitions. ►►──┬─────────────────┬──MEXIT─────────────────────────────────────►◄ └─sequence_symbol─┘ sequence_symbol is a sequence symbol. The MEXIT instruction causes the assembler to exit from a macro definition to the next sequential instruction after the macro instruction that calls the definition. (This also applies to nested macro instructions, which are described in “Nesting Macro Instruction Definitions” on page 311.) For example, the following macro definition contains an MEXIT statement: 260 HLASM V1R5 Language Reference

Comment Statements MACRO EXITS DC DC DC MEXIT DC DC DC MEND C'A' C'B' C'C' C'D' C'E' C'F' When the macro definition described above is called, the following statements are generated: EXITS + DC C'A' + DC C'B' + DC C'C' Comment Statements Two types of comment statements can be used within a macro definition: Ordinary comment statements Internal macro comment statements Ordinary Comment Statements Ordinary comment statements let you make descriptive remarks about the generated output from a macro definition. Ordinary comment statements can be used in macro definitions and in open code. An ordinary comment statement consists of an asterisk in the begin column, followed by any character string. The comment statement is used by the assembler to generate an assembler language comment statement, just as other model statements are used by the assembler to generate assembler statements. No variable symbol substitution is done. Internal Macro Comment Statements You can also write internal macro comments in the body of a macro definition to describe the operations done during conditional assembly when the macro is processed. An internal macro comment statement consists of a period in the begin column, followed by an asterisk, followed by any character string. No values are substituted for any variable symbols that are specified in internal macro comment statements. Internal macro comment statements may appear anywhere in a macro definition. Notes: 1. Internal macro comments are not generated. 2. The comment character string may contain double-byte data. 3. Internal macro comment statements can be used in open code, however, they are processed as ordinary comment statements. Chapter 7. How to Specify Macro Definitions 261

COPY Instruction<br />

sequence_symbol<br />

is a sequence symbol.<br />

number_of_lines<br />

is a non-negative decimal integer that specifies the number of lines to be left<br />

blank. If number_of_lines is omitted, one line is left blank. If number_of_lines<br />

has a value greater than the number of lines remaining on the listing page, the<br />

instruction has the same effect as an AEJECT statement.<br />

Notes:<br />

1. The ASPACE instruction can only be used inside a macro definition.<br />

2. The ASPACE instruction itself is not printed in the listing.<br />

3. The ASPACE instruction does not affect the listing of statements generated<br />

when the macro is called.<br />

COPY Instruction<br />

The COPY instruction, inside macro definitions, lets you copy into the macro<br />

definition any sequence of statements allowed in the body of a macro definition.<br />

These statements become part of the body of the macro before macro processing<br />

takes place. You can also use the COPY instruction to copy complete macro<br />

definitions into a source module.<br />

The specifications for the COPY instruction, which can also be used in open code,<br />

are described in “COPY Instruction” on page 122.<br />

MEXIT Instruction<br />

The MEXIT instruction provides an exit for the assembler from any point in the<br />

body of a macro definition. The MEND instruction provides an exit only from the<br />

end of a macro definition (see “MEND Statement” on page 245 for details).<br />

The MEXIT instruction statement can be used only inside macro definitions.<br />

►►──┬─────────────────┬──MEXIT─────────────────────────────────────►◄<br />

└─sequence_symbol─┘<br />

sequence_symbol<br />

is a sequence symbol.<br />

The MEXIT instruction causes the assembler to exit from a macro definition to the<br />

next sequential instruction after the macro instruction that calls the definition. (This<br />

also applies to nested macro instructions, which are described in “Nesting Macro<br />

Instruction Definitions” on page 311.)<br />

For example, the following macro definition contains an MEXIT statement:<br />

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