The REPRO assembler-instruction causes data on the following statement line to be punched into a card. The data is not processed; it is punched in a card: and no substitution is performed for variable symbols. No sequence number or identification is punched on the card. One REPRO instruction produces one punched card. The REPRO instruction may not appear before a macro definition. REPRO statements that occur before all statements composing the first or only control section will punch cards which precede all other cards of the object deck. The format is:
Name A sequence
symbol or blank
Operation REPRO
Operand Blank
The line to be reproduced may contain any combination of up to 80 valid characters. Characters may be entered starting in column 1 and continuing through column 80 of the line. Column i of the line corresponds to column i of the card to be punched.
ORG SET LOCATION COUNTER
The 0RG instruction is used to alter the setting of the location counter for the current control section. The format of the ORG instruction statement is:
Name A sequence symbol or blank
Operation 0RG
Operand
A relocatabie ex-pression or blank
Any symbols in the expression must have been previously defined. The unpaired relocatable symbol must be defined in the same control section in which the ORG statement appears.
The location counter is set to the value of the expression in the operand. If the operand is omitted, the location counter is set to the next available (unused) location for that control section.
An ORG statement cannot be used to specify a location below the beginning of the control section in which it appears. The following is invalid if it appears less than 500 bytes from the beginning of the current control section.
Name Operat ion Operand
ORG *-500
If it is desired to reset the location counter to the next available byte in the current control section, the following statement would be used:
Name Operation Operand
ORG
If previous ORG statements have reduced the location counter for the purpose of redefining a portion of the current control section, an ORG statement with an omitted operand can then be used to terminate the effects of such statements and restore the location counter to its highest setting.
Note: Through use of the ORG statement two instructions may be given the same location counter values. In such a case the second instruction will not always eliminate the effects of the first instruction. Consider the following example:
ADDR DC A(LOC)
ORG *-4
B DC C wBETAt
In this example the value of B (BETA) will be destroyed by the relocation of ADDR during linkage editing.
LTORG -- BEGIN LITERAL POOL
The LTORG instruction causes all literals since the previous LTORG (or start of the program) to be assembled at appropriate boundaries starting at the first double-word boundary following the LTORG statement. If no llterals follow the LTORG statement, alignment of the next instruction
(which Is not an LTORG instruction) wlll occur. Bytes skipped are not zeroed. The format of the LTORG instruction statement Is:
Name Operation
Symbol LTORG
or Blank
Operand Not Used
The symbol represents the address of the first byte of the literal pool. It has a length attribute of i.
5-37
The literal pool is organized into four segments within which the llterals are stored in order of appearance, dependent on the divisibility properties of their object lengths (dup factor times total explicit or implied length). The first segment contains all literals whose object length is a multiple of eight. Those remaining literals with lengths divisible by four are stored in the second segment. The third segment holds the remaining even-length literals. Any literals left over have odd lengths and are stored in the fourth segment.
Since each literal pool begins at a double-word boundary, this guarantees that all segment one literals are double-word, segment two full-word, and segment three half-word aligned, with no space wasted except, possibly, at the pool origin.
Literals from the following statement are in the pool, in the segments indicated by the circled numbers, where_ means multiple of eight, etc., MVC A(12),'3F'I'
SH 3,mH'2 ' Q
LM 0,3,ffi2F'l,2'
IC 2,mXLI'I' O
AD 2,'D'2'
Special Addressin_ Consideration
Any literals used after the last LTORG statement in a program are placed at the end of the first control section. If there are no LTORG statements in a program, all literals used in the program are placed at the end of the first control section. In these circumstances the programmer must ensure that the first control section is always addressable. This means that the base address register for the first control section should not be changed through usage in subsequent control sections. If the programmer does not wish to reserve a register for this purpose, he may place an LTORG statement at the end of each control section thereby ensuring that all literals appearing in that section are addressable.
Duplicate Literals
If duplicate literals occur within the range controlled by one LTORG statement, only one literal is stored. Literals are considered duplicates only if their specifications are identical. A literal will be stored, even if it appears to duplicate another literal, if it is an A-type address constant containing any reference to the location counter.
The following examples illustrate how the assembler stores pairs of literals, if the placement of each pair is controlled by the same LTORG statement.
X'FO' C'O'
Both are stored
XL3'O' HL3'0'
A(*+4) A(*+4) X'FFFF' X'FFFF'
Both are stored
Both are stored
Identical; the first is stored
CNOP -- CONDITIONAL NO OPERATION
The CNOP instruction allows the programmer to align an instruction at a specific half-word boundary. If any bytes must be skipped in order to align the instruction properly, the assembler ensures an unbroken
instruction flow by generating no-operatlon instructions. This facility is useful in creating calling sequences consisting of a linkage to a
subroutine followed by parameters such as channel command words (CCW).
The CNOP instruction ensures the alignment of the location counter setting to a half-word, word, or double-word boundary. If the location counter is already properly aligned, the CNOP instruction has no effect.
If the specified alignment requires the location counter to be incremented, one to three no-operation instructions are generated, each of which uses two bytes.
The format of the CNOP instruction statement is as follows:
Name A sequence symbol or blank
Operation CNOP
Operand
Two absolute ex-pressions of the
form b,w
Any symbols used in the expressions in the operand field must have been previously defined,
Operand b specifies at which byte in a word or double word the location counter is to be set; b can be 0, 2, 4, or 6. Operand w specifies whether byte b is in a word (w-4) or double word (w-8). The following
pairs of b and w are valid:
5-39
b,w
Specifies0,4 2,4 0,8 2,8 4,8 6,8
Beginning of a word Middle of a word
Beginning of a double word
Second half-word of a double-word
Middle (third half-word) of a double-word Fourth half-word of a double-word
Figure 5-6 shows the position in a double word that each of these pairs specifies. Note that both 0,4 and 2,4 specify two locations in a double-word.
Double Word
Word Word
Half Word Half Word
Byte Byte Byte
Byte Byte
Half Word
Byte ] Byte
Half Word Byte
0,4 2,4 0,4 2,4
0,8 2,8 4,8 _ 6,8
Figure 5-6. CNOP Alignment
Assume that the location counter is currently aligned at a double-word boundary. Then the CNOP instruction in this sequence:
Name Operation Operand
CNOP 0,8
BALR 2,14
has no effect; it is merely printed in the assembly listing. However, this sequence:
Name Operation Operand
CNOP B_ALR
6,8 2,14
causes three branch-on-conditlons (no-operations) to be generated, thus aligning the BALR instruction at the last half-word in a double-word as follows:
\
Name Operation 0perand
BCR BCR BCR BALR
0,0 0,0 0,0 2,14
After the BALR instruction is generated, the location counter is at double-word boundary, thereby ensuring an unbroken instruction flow.
COPY -- COPY PREDEFINED SOURCE CODING
The COPY instruction obtains source-language coding from a library and includes it in the program currently being assembled. The format of the COPY instruction statement is as follows:
Name Operation Operand
Blank COPY One symbol
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. Inserting code in the library to be copied later is performed by the IEBUPDAT or IEBUPDTE routines, details of which are covered in the "OS Utilities."
The assembler inserts the requested coding immediately after the COPY statement is encountered. The requested coding may not contain any COPY, END, ICTL, ISEQ, MACRO, or MEND statements.
If identical COPY statements are encountered, the coding they request is brought into the program each time. All statements included in the program via COPY are processed using the standard format regardless of any ICTL instructions in the program. (For a further discussion of COPY see Section 7.)
END -- END ASSEMBLY
The END instruction terminates the assembly of a program. It may also designate a point in the program or in a separately assembled program to which control may be transferred after the program is loaded. The END
instruction must always be the last statement in the source program. A literal may not be used. If an external symbol is used in the expression,
the value of the expression must be O.
5-41
The format of the END instruction statement is as follows:
Name Operation Operand
Blank END A relocatable
ex-pression or blank
The operand specifies the point to which control may be transferred when loading is complete. This point is usually the first machine-instruction in the program, as shown in the following sequence•
NAME AREA BEGIN
Operation CSECT DS BALR USING
END
Operand
50F 2,0
*,2
BEGIN
Note: Editing errors in system macro definitions (macro definitions included in a macro library) are discovered when the macro definitions are read from the macro library. This occurs after the END statement has been read. They will therefore be flagged after the END statement• If the programmer does not know which of his system macros caused an error, it is necessary to punch all system macro definitions used in the program, including inner macro definitions, and insert them in the source program as programmer macro definitions, since programmer macro definitions are flagged in-line. To aid in debugging it is advisable to test all macro definitions as programmer macro definitions before incorporating them in
the library as system macro definitions•
k