• Aucun résultat trouvé

END--END ASSEMBLY

Dans le document Assembler H Version 2 Application Programming: (Page 153-156)

o

o

The operand is a symbol that identifies a partitioned data set member to be copied from either the system macro library or a user library concatenated to it.

The source coding that is copied into a source module:

• Is inserted immediately after the COPY instruction

• Is inserted and processed according to the standard instruction statement coding format, even if an ICTL instruction has been specified

• Must not contain either an ICTL or ISEQ instruction

• Can contain other COpy statements1

• Can contain macro definitions

If a source macro definition is copied into the beginning of a source module, both the MACRO and MEND statements that delimit the definition must be contained in the same level of copied code.

Notes:

1. The COPY instruction can also be used to copy statements into source macro definitions.

2. The rules that govern the occurrence of assembler language statements in a source module also govern the statements copied into the source module.

You use the END instruction to terminate the assembly of a

program. You can also supply an address in the operand field to which control may be transferred after the program is loaded.

The END instruction must always be the last statement in the source program.

The format of the END instruction statement is:

Name Operation Operand

A sequence END A relocatable

symbol or expression or blank

blank

The operand specifies the point to which control may be

transferred when loading is complete. This point is usually the address of the first executable instruction in the program, as shown in the following sequence.

1 There are no restrictions on the number of levels of nested copy instructions. However, the COPY nesting must not be recursive. Thus, if the statement 'COpy A' is coded, and A contains a statement 'COPY B', B must not contain a

statement 'COPY A'.

Chapter 5. Assembler Instruction statements 139

Name Operation Operand

NAME CSECT

AREA DS 50F

BEGIN BAlR 2,0

USING *,2

· ·

END

·

BEGIN

If specified, the operand entry can be generated by substitution into variable symbols. However, after substitution, that is, at assembly time:

• It must be a relocatable expression representing an address in the source module delimited by the END instruction, or

• If it contains an external symbol, the external symbol must be the only term in the expression, or the remaining terms in the expression must reduce to zero.

• It must not be a literal.

LISTING CONTROL INSTRUCTIONS

The instructions described in this section request the assembler to produce listings and identify output cards in the object deck according to your special needs. They allow you to determine printing and page formatting options other than the ones the assembler program assumes by default. Among other things, you can introduce your own page headings, control line spacing, and suppress unwanted detail.

TITLE--IDENTIFY ASSEMBLY OUTPUT

The TITLE instruction allows you to:

• Provide headings for each page of the assembly listing of your source modules.

• Identify the assembly output cards of your object modules.

You can specify up to 8 identification characters that the assembler will punch into all the output cards, beginning at column 73. The assembler punches sequence numbers into the columns that are left, up to column 80.

The format of the TITLE instruction statement is:

Name operation operand

A string of TITLE A character string up to

alphameric 100 characters, enclosed

characters, in apostrophes

a variable symbol, a com-bination of above, a

sequence symbol, or a blank

The first three options for the name field have a special

significance only for the first TITLE instruction in which they are specified. For subsequent TITLE instructions, the first three options do not apply.

For the first TITLE instruction of a source module that has a nonblank name entry that is not a sequence 5ymbol, up to 8 140 Assembler H Versi on 2 Appl i cat ion Program.mi ng: language Reference

C

: " I

"

()

o

o

o

alphameric characters can be specified in any combination in the name field.

These characters are punched as identification, beginning at column 73, into all the output cards from the assembly, except those produced by the PUNCH and REPRO instructions. The

assembler substitutes the current value into a variable symbol and uses the generated result as identification characters.

If a valid ordinary symbol is specified, its appearance in the name field does not constitute a definition of that symbol for the source module. It can, therefore, be used in the name field of any other statement in the same source module.

The character string in the operand field is printed as a heading at the top of each page of the assembly listing. The heading is printed beginning on the page in the listing

following the page on which the TITLE instruction is specified.

A new heading is printed when a subsequent TITLE instruction appears in the source module.

For example, if the following statement is the first TITLE statement to appear in a program:

Name Operation Operand

PGM1 TITLE 'FIRST HEADING'

then PGM1 is punched into all of the output cards (c6lumns 73 through 76) and this heading appears at the top of each

subsequent page: PGM1 FIRST HEADING.

If the following statement occurs later in the program:

Name Operation Operand

TITLE 'A NEW HEADING' then PGMlis still punched into the output cards, but each following page begins with the heading: PGMI A NEW HEADING.

Each TITLE statement causes the listing to be advanced to a new page (before the heading is printed), except when PRINT NOGEN is in use.

Any printable character specified will appear in the heading, including blanks. Variable symbols are allowed. However, the following rules apply to ampersands and apostrophes:

• A single ampersand initiates an attempt to identify a variable symbol and to substitute its current value.

• Double ampersands or apostrophes specified, print as single ampersands or apostrophes in the heading.

• A single apostrophe followed by one or more blanks simply terminates the heading prematurely. If a nonblank character follows a single apostrophe, the assembler issues an error message and prints no heading.

Only the characters printed in the heading count toward the maximum of 100 characters allowed.

Note:

The TITLE statement its~lf is not printed in an assembly listing.

Chapter 5. Assembler Instruction Statements 141

Dans le document Assembler H Version 2 Application Programming: (Page 153-156)