• Keine Ergebnisse gefunden

... . ,w-4

OPERANDI, OPERAND2, OPERAN X I D3 THIS IS THE NORMAL X I

STATEMENT FORMAT

OPERANDI, THIS IS THE AL X t OPERAND2, OPERAND3 TERNA X ] TE STATEMENT FORMAT i-J OPERANDI, THIS IS A COMB X!

OPERAND2,0PERAND3,OPERANX

D4,0PERAND5 INATION OF _X BOTH STATEMENT FORMATS

L

MODEL STATEMENTS

Model statements are the macro-definition statements from which the desired sequences of assembler language statements are generated. Zero or more model statements may follow the prototype statement. A model state-ment consists of one to four fields. They are, from left to right, the name, operation, operand, and comments fields.

The fields in the model statement must correspond to the fields in the generated statement. It is not possible to generate blanks to separate statement fields.

Model statement fields must follow the rules for paired apostrophes, ampersands, and blanks as macro-instruction operands (see

"Macro-Instruction 0perands" in Section 8).

Though model statements must follow the normal continuation card conventions, statements generated from model statements may have more than two continuation lines. Substituted statements may not have blanks in any field except between paired apostrophes. They may not have leading blanks in the name field.

Name Field

The name field may be blank or it may contain an ordinary symbol, a variable symbol, or a sequence symbol. It may also contain an ordinary symbol concatenated with a variable symbol or a variable symbol concatenated with one or more other variable symbols.

Variable symbols may not appear in the name field of ACTR, COPY, END, ICTL, ISEQ, or OPSYN statements. The characters * and .* may not be substituted for a variable symbol.

7-4

L_

Operation Field

The operation field may contain a machine instruction, an assembler instruction listed in Section 5 (except END, ICTL, ISEQ, OPSYN, or PRINT), a macro instruction, or variable symbol. It may also contain an ordinary symbol concatenated with a variable symbol or a variable symbol concatenated with one or more other variable symbols.

Variable symbols may not be used to generate

• Macro Instructions

• Macro prototypes

• The following instructions:

ACTR GBLA MEXIT

AGO GBLB MNOTE

AIF GBLC OPSYN

ANOP ICTL PRINT

COPY I SEQ REPRO

CSECT LCLA SETA

DSECT LCLB SETB

END LCLC SETC

MACRO START

MEND

Variable symbols may also be used outside of macro-definltions to generate mnemonic operation codes with the preceding restrictions.

The use of COPY instructions is described under "COPY Statements".

Variable symbols in the llne following a REPRO instruction, will not be replaced by their values.

Operand Field

The operand field may contain ordinary symbols or variable symbols.

However, variable symbols may not be used in the operand field of COPY, ICTL, ISEQ, or OPSYN instructions.

Comments Field

The comments field may contain any combination of characters. No substitution is performed for variable symbols appearing in the comments field. Only generated statements will be printed in the listing.

SYMBOLIC PARAMETERS

A symbolic parameter is a type of variable symbol that is assigned values by the programmer when he writes a macro-instruction. The programmer may vary statements that are generated for each occurrence of a macro-instruction by varying the values assigned to symbolic parameters.

A symbolic parameter consists of an ampersand followed by from one through seven letters and/or digits, the first of which must be a letter.

Elsewhere, two ampersands must be used to represent an ampersand.

The programmer should not use &SYS as the first four characters of a symbolic parameter.

The following are valid symbolic parameters:

&READER &LOOP2

&A23456 &N

&X4F2 &$4

The following are invalid symbolic parameters:

CARDAREA

&256B

&AREA2456

&BCD%34

&IN AREA

(first character is not an ampersand)

(first character after ampersand is not a letter) (more than seven characters after the ampersand)

(contains a special character other than initial ampersand) (contains a special character, i.e., blank, other than initial ampersand)

Any symbolic parameters in a model statement must appear in the prototype statement of the macro-definitlon.

The following is an example of a macro-definltion. Note that the symbolic parameters in the model statements appear in the prototype statement.

Header Prototype Model

Model Model Model Trailer

Name Operation Operand

& NAME

& NAME

MACRO MOVE

ST L

ST L MEND

&TO,&FROM 2,SAVE 2,&FROM 2,&TO 2,SAVE

Symbolic parameters in model statements are replaced by the characters of the macro-instruction that correspond to the symbolic parameters.

7-6

In the following example the characters HERE,FIELDA,

and FIELDB of

the MOVE macro-instruction correspond to the symbolic parameters &NAME,

&TO, and &FROM, respectively, of the MOVE prototype statement.

Name Operation Operand

HERE MOVE FIELDA,FIELDB

Any occurrence of the symbolic parameters &NAME, &TO, and &FROM in a model statement will be replaced by the characters HERE, FIELDA, and FIELDB, respectively. If the preceding macro-lnstructlon were used in a source program, the following assembler language statements would be generated:

Name Operation Operand

HERE ST

L ST L

2,SAVE 2,FIELDB 2,FIELDA 2,SAVE

The example below illustrates another use of the MOVE macro instruction using operands different from those in the preceding example.

Macro Generated Generated Generated Generated

Name Operation Operand

LABEL MOVE IN,OUT

LABEL ST

L ST L

2,SAVE 2,OL_

2,1N 2,SAVE

If a symbolic parameter appears in the comments field of a model statement, it is not replaced by the corresponding characters of the macro-instruction.

Concatenating Symbolic Parameters with Other Characters or Other Symbolic Parameters

If a symbolic parameter in a model statement is immediately preceded or followed by other characters or another symbolic parameter, the characters that correspond to the symbolic parameter are combined in the generated statement with the other characters or the characters that

correspond to the other symbolic parameter. This process is called