Memorex Assembler Reference Manual
Below you will find brief information for MRX/OS. The MRX/OS Assembler translates source program statements made of instructions and auxiliary functions, controlling address assignment, data definition, and program segmentation within the MRX 40/50 system.
Advertisement
Advertisement
MRX/OS Assembler
Reference Manual
2202.001-01 =
SESIÓN IN
WojSÁS 1aINndwo9
'S}onpoid
December 1972 Edition
This edition (2202.001-01) is a major revision of, and obsoletes,
the previous preliminary edition (2202.001).
Requests for copies of Memorex publications should be made
to your Memorex representative or to the Memorex branch
office serving your locality.
A reader's comment form is provided at the back of this
publication. If the form has been removed, comments may be
addressed to the Memorex Corporation, Publications Dept.,
8941 -- 10th Ave. No. (Golden Valley) Minneapolis,
Minnesota 55427
© 1972, MEMOREX CORPORATION
PREFACE
This reference publication is intended for programmers using the MRX/OS Assembler
Language. This publication describes how to write assembler source statements, including
assembler instructions, macro instructions, and conditional assembly statements. These
instructions are summarized in Appendix E. Machine instructions and extended mnemonic
codes are summarized in Section 3, and additional reference tables appear in Appendixes B,
C, and D. The machine instructions are described in detail in the publication 7200 or 7300
Processing Unit Reference.
TABLE OF CONTENTS
Section
1 INTRODUCTION
Function of the Assembler
Relationship to the Operating System
System Requirements
2 WRITING SOURCE STATEMENTS
Character Set
Basic Format of Source Statements
Terms and Expressions
Terms
Constants
String Constants
Character String Constant
Hexadecimal String Constant
Packed Decimal String Constant
Zoned Decimal String Constant
Integer String Constant
Arithmetic Constants
Decimal Arithmetic Constant
Hexadecimal Arithmetic Constant
Symbols
Ordinary Symbols
Variable Symbols
Concatenation of Variable Symbols
Sequence Symbols
Location Counter Reference
Symbol Length Attribute
Literals
Expressions
Evaluation of Expressions
Absolute and Relocatable Expressions
Absolute Expressions
Relocatable Expressions
Examples of Absolute and Relocatable Expressions
Coding Form
. Name Field
Operation Field
Operand Field
Comment Field
ldentification-Sequence Field
Statement Continuation
Page
1-1
a =
№ N
2-1
2-1
2-3
2-3
2-4
2-5
2-5
2-5
2-6
2-6
2-6
2-6
2-7
2-7
2-8
2-8
2-9
2-10
2-10
2-11
2-11
2-12
2-13
2-14
2-15
2-17
2-17
2-18
2-18
2-18
2-10
2-20
2-20
2-20
2-20
2-21
Section
3
TABLE OF CONTENTS (Continued)
MACHINE INSTRUCTIONS
Source Statements
Instruction Alignment and Checking
Operands and Suboperands |
Name and Length Attributes
Notation Used to Describe Machine instructions
Summary of Machine Instructions
General-Purpose Instructions
System Instructions
Summary of Extended Mnemonics
Extended Mnemonic Codes
ASSEMBLER INSTRUCTION SOURCE STATEMENTS —
OVERVIEW
PROGRAM SECTIONING AND LINKING STATEMENTS
CSECT — Identify Control Section
Symbolic Linkage Statements — ENTRY and EXTRN
ENTRY — Identify ENTRY Point SYMBOL
EXTRN — Identify External Symbol
COM — Define Common Control Section
Reserved Symbolic Segment Name — $SYSEG
PROGRAM CONTROL STATEMENTS
ORG — Set Location Counter
END — End Assembly
PUNCH — Write to File
LTORG — Begin Literal Pool
ICTL — Input Format Control
ISEQ — Input Sequence Checking
ALIGN — Align Location Counter
LINKAGE-EDITOR MAP DIRECTIVE — SEG
SYMBOL AND DATA DEFINITION STATEMENTS
EQU — Equate
WDD and BDD — Word and Byte Defined Data
WRS and BRS -- Word and Byte Reserve Storage
FORM — Define Data Format
FORM — Instruction Statement
Padding and Truncation Rules for Form Statements
Page
3-1
3-1
3-1
3-1
3-2
3-2
3-3
3-5
3-9
3-10
3-11
4-1
5-1
5-2
5-2
5-3
5-4
5-6
6-1
6-1
6-3
6-3
6-4
6-4
6-5
6-6
7-1
8-1
8-1
8-2
8-5
8-7
8-8
Section
9
10
TABLE OF CONTENTS (Continued)
LISTING CONTROL STATEMENTS
TITLE — Identify Listing
EJECT — Start New Page
SPACE -- Insert Blank Lines
PRINT — Print Optional Data
MACRO LANGUAGE AND CONDITIONAL ASSEMBLY
STATEMENTS
Macro Language
Macro Definition
Header Statement
Prototype Statement
Model Statements
Termination Statement
Macro Instruction
Positional Operands
Keyword Operands
Special Characters in a Macro Instruction
Escape Character
Ampersand
Apostrophe
Parentheses
Comma
Semicolon
Blank
Sublists in Macro Instructions
Sublists in Model Statements
Substring Notation
Concatenation of Variable Symbols
Nesting of Macros
MNOTE — Generate Error Message |
MEXIT — Alternate Termination for Macro Definition
System Variable Symbols — &SYSNDX and &SYSECT
&SYSNDX
&SYSECT
Conditional Assembly Statements
Set Statements
SETA — Assign Arithmetic Value to Set Symbol
SETC — Assign Character Value to Set Symbol
GBLA and GBLC — Global Arithrnetic and Character Set
Symbols |
ADO — Iterative Return
vii
Page
9-1
9-1
9-2
9-2
9-3
10-1
10-1
10-1
10-2
10-2
10-3
10-5
10-5
10-6
10-6
10-7
10-7
10-7
10-8
10-8
10-8
10-8
10-9
10-9
10-9
10-10
10-11
10-12
10-12
10-13
10-13
10-13
10-15
10-15
10-16
10-16
10-18
10-20
10-20
TABLE OF CONTENTS (Continued)
Section
10 (cont) Nesting of ADO Statements
AGO — Unconditional Branch
ANOP — Label Definition
Count and Number Attributes
Count Attribute
Number Attribute
11 CONTROL LANGUAGE STATEMENTS
APPENDIX A — EBCDIC REPRESENTATION
APPENDIX B — OBJECT FORMATS OF MACHINE INSTRUCTIONS
APPENDIX C — ALPHABETICAL LIST OF MNEMONICS
APPENDIX D — HEX CODE TO MNEMONIC CODE
APPENDIX E — SUMMARY OF ASSEMBLER STATEMENTS
APPENDIX F — MACRO EXAMPLE
APPENDIX G — ASSEMBLER ERROR MESSAGES
viii
Page
10-22
10-23
10-23
10-24
10-24
10-25
A-1
B-1
C-1
D-1
E-1
F-1
G-1
LIST OF FIGURES
Figure
2-1
2.2
2-3
2-4
2-5
2-6
2-7
2-8
2-9
2-10
2-11
2-12
5-1
5-2
8-1
8-2
8-4
10-1
10-2
10-3
10-4
10-5
10-6
10-7
108
10-9
10-10
10-11
11-1
11-2
11-3
11-4
Character Usage
Source Statement Format
Types of Terms
Character Constants
Truncation and Padding of String Constant Values
Examples of Assembled Constants
Concatenation of Variable Symbols
Examples of Length Attributes
Examples of Literals
Examples of Duplicate Literals
Types of Operators
Source Code Form
Example of EXTRN and ENTRY
Example of the COM Statement
Examples of EQU Statements
Examples of WDD and BDD Statements
Example of an ORG Statement with WDD and BRS
Examples of Padding and Truncation for Form Statements
Macro Definition
Macro Instruction — Positional Operands
Macro Instruction — Keyword Operands
Examples of Substring Notation
Concatenation of Variable Symbols
Nesting of Macros
Using &SYSNDX with Inner and Outer Macros
Examples of &SYSNDX
Example of &SYSECT
Example of the AGO Statement
Examples of the Count Attribute
Example of Control Language Statements
Example of Control Language Statements
Example of Control Language Statements
Placing Files on Disk — Example
IX
Page
2.2
2.3
2-4
2.5
2.7
2.8
2-10
2-12
2-13
2-14
2-16
2-19
5-3
5-5
8-2
8-3
8-6
10-4
10-6
10-7
10-11
10-11
10-12
10-14
10-14
10-15
10-24
10-25
11-4
11-5
11-6
11-6
1. INTRODUCTION
FUNCTION OF THE ASSEMBLER
The MRX/OS Assembler consists of a language and an assembler program. The language is a
set of codes and coding rules for writing a source program. The assembler program translates
the source program into an object program that can be executed by the system. The object
program produced by the assembler is in the form of relocatable object modules. This
translation process is called an assembly. |
Two types of source statements can be expressed in the assembler language, machine
instructions and assembler instructions. |
The machine instruction source statements provide mnemonic codes for all machine
instructions in the MRX 40/50 instruction set. Extended mnemonic codes are also provided
for the skip and branch instructions. Section 3 of this manual describes the general format
of the machine instructions. A complete description of the machine instructions, addressing
techniques, and data representation is in the manual 7200 or 7300 Processing Unit
Reference.
The assembler instruction source statements specify auxiliary functions to be performed by
the assembler program. These functions include:
e Checking and documenting programs
e Controlling address assignment
e Segmenting programs
e Defining data and symbols
e Generating macro and form instructions
e Controlling the assembly process through conditional assembiy
statements
The macro facility enables the programmer to define and use macro instructions. A macro
instruction is represented by an operation code which, in turn, stands for a sequence of
statements that accomplish the desired function.
Conditional assembly statements affect the order of source statement assembly and macro
generation, or the content of generated statements.
1-1
A listing of the source program statements and the resulting object program statements may
be produced with programmer control of form and content. A cross-reference list of symbol
definitions and references is also produced unless suppressed by the programmer. Errors
detected during assembly are indicated in the program listing. Warning errors may be
suppressed.
RELATIONSHIP TO THE OPERATING SYSTEM
The assembler program is a component of the MRX 40/50 operating system and operates
under its control. The operating system provides the assembler program with input/output,
segment loading, library, and other services needed for its proper functioning. The assembler
program is called through Control Language statements and resides in a user partition during
execution. |
SYSTEM REQUIREMENTS
The MRX 40/50 System equipment configuration required to execute the assembler
program is as follows.
e 16K bytes of main storage, of which at least 8K bytes must be
available to the assembler (additional storage, up to 24K, will
increase the performance of the assembler)
e One source input device or data set
o One list device or data set
e One operator console
e One 660 disc storage drive
e The standard instruction set
1-2
2. WRITING SOURCE STATEMENTS
To write source statements, the programmer should be familiar with the following topics:
e Character set
e Basic format of source statements |
© Types of terms and expressions
e Coding form
CHARACTER SET
Source statements may contain the following characters:
Letters A through Z, and $
Digits O through 9
Special + * au
Characters - (7
, ) rs
. "blank
= / # @<>
The EBCDIC formats and card punch codes for these characters are listed in Appendix A.
Any of the 256 punch combinations may appear inside a character constant, in comments,
or in macro instruction operands. The meanings of these characters, and combinations of
these characters, are explained in Figure 2-1.
2-1
Character
Explanation
Example
A through Z, and $
Used in symbols and character string constants
C' ACCOUNT NO."
O through 9 Used in numeric constants and symbols TAG3,5825
, Operand or suboperand separator HERE, THERE
= Indicates a literal term or a keyword parameter =A+2
value
Cc Defines a character constant (all characters to C'ABC'
the next apostrophe)
X’ Defines a hexadecimal string constant (all hexa- X’1AFEE’
decimal characters to the next apostrophe)
Р' Defines a packed decimal string constant (all Р'425'
characters to the next apostrophe)
7' Defines a zoned decimal string constant (all Z'-44'
characters to the next apostrophe)
I Defines an integer string constant (all 1'4286'
characters to the next apostrophe)
Ш Defines a hexadecimal arithmetic constant “"FF1A
Define relational (EQ, GT, LT, NE, LE, GE) A<EQ>B
<> and logical (NOT, AND, OR, EOR) operations A<AND>B
L' Defines a reference to a symbol length L'SYMX
attribute
* Location counter reference or multiplication *+4
indicator 12*20
/ Division indicator (Note that 1/2=0 because 10/0
division always results in an integer, not a TAG/B
fraction.)
+ Addition Indicator TAG+12
Subtraction Indicator TAB-4
& Defines a variable symbol &TAC
() Separates an address-modifying index from the PAG(R2)
rest of the address, delimits sublisted operands,
or encioses operands or suboperands
Used for sequence symbols and concatenation LAST
* Used for macro definition comments .* COMMENT
# The character following this symbol is to be C'24# 4'
evaluated for its literal value, not for its special
function. In the exampie, the symbol following
the # sign is a semicolon, not a continuation
indicator.
Continuation indicator
THE STATEMENT 15;
Indirect Addressing
@REG1,@TAG1
blank
field separator
ADDR 3,4
Figure 2-1. Character Usage
2-2
BASIC FORMAT OF SOURCE STATEMENTS
Source program statements have the fields outlined in Figure 2-2.
Name Operation Operand Comment
Any symbol | Machine instruction, Single expression, Informational material
or blank assembler instruction, several expressions, | or blank
macro instruction, or or blank
FORM instruction
Figure 2-2. Source Statement Format
The name field entry is a symbol used to identify a statement. The name field is necessary
for certain statements, or when the statement is referred to in another statement, such as in
a Branch instruction.
The operation field entry is a predefined mnemonic code (or mnemonic) which identifies
the function of a machine, macro, assembler, or FORM instruction. Mnemonics are designed
to be easily learned and remembered; for example, ADDR for Add Register-Register, or
EQU for an Equate assembler instruction.
The operand field entry defines or identifies the data involved in the operation. Most
statements have one or more operands, although some statements have no operands at all.
Each operand has one or more terms, which may be used in a combination to form one or
more expressions. (Refer to immediately following text for a discussion of terms and
expressions.) An operand field may not have more than 35 terms. Operands of machine
statements generally represent storage locations, general registers, immediate data, or
constant values. Operands of assembler statements provide the information necessary for the
assembler to perform the designated operation.
The optional comment field contains any informational material the programmer wishes to
add.
TERMS AND EXPRESSIONS
A term is a symbol, character, or number that represents a value; an expression is a single
term or a combination of terms. An expression is used in the operand field of a source
statement. The following text fully defines terms s and expressions.
2-3
TERMS
Every term represents a value; the value may be assigned by the assembler program (symbol,
symbol length attribute, location counter reference) or may be inherent in the term itself
(constant, literal).
An arithmetic combination of terms is reduced to a single arithmetic value by the assembler.
An arithmetic value is represented as a 16-bit binary value in two's complement form. A
logical value has a range о? О through 65,535; and an arithmetic value has a range of -32,768
through 32,767. Limitations on the value of an expression depend on its use. For example, a
term designating a general register must have a value between 0-7 inclusively; a term
representing an address must not exceed the size of storage.
A term is absolute if its value does not change upon program relocation. It is relocatable if
its value changes upon program relocation.
The terms used in assembler statements are outlined in Figure 2-3. An explanation of each
type of term and the rules for its use are provided in the following text.
Character String
Constant C'ABC'
Hexadecimal String
Constant X'C49FE'
Packed Decimal
String Constants String Constant Р'-244'
Zoned Decimal
String Constant Z'246'
Integer String
Constants Constant 1-323’
Decimal Arithmetic
Arith ,
rithmetic Constant 2316
Constants
Hexadecimal Arithmetic
Constant "ЭРА
Ordinary Symbols
Symbolic Parameter &TAB1
Symbols Variable Symbols System Variable Symbols &SYSNDX
Set Symbols &TAB3
Sequence Symbols
Location
Counter
Reference *-20
Symbol
Length
Attribute L'TAB1
Literals =HERE
Figure 2-3. Types of Terms
2-4
CONSTANTS
Constants are terms whose values are inherent in the terms themselves. They specify
machine values or bit configurations directly, rather than by equating the values to symbols
and then using symbolic references. Constants represent such program elements as
immediate data, masks, registers, addresses, and address increments.
Constants are string or arithmetic. String constants are of variable size; arithmetic constants
are 16 bits long. Examples of all types of constants are presented in Figure 2-6.
String Constants
A string constant can only be used as a single term expression, or in a relational expression.
In a relational expression, both terms must be of the same type (character, hexadecimal,
etc.), for example: C'ABCE'< LT>C'&P1".
Character String Constant
A character string constant is written as the letter C followed by a character string enclosed
in apostrophes, for example: C'STRING'’. To represent the literal value of an apostrophe, an
ampersand, a semicolon, or a pound sign as part of the character constant, the character
must be immediately preceded by an escape character, which is the pound sign. The length
of a character constant is equal to the number of characters in the constant, excluding the
escape characters, which do not appear in storage.
Examples of character constants are shown in Figure 2-4. In the last example of Figure 2-4,
the generated code is: THIS CHARACTER STRING HAS MANY SPECIAL CHARACTERS
IN IT: 4: "8. |
OPERAND
17| 18| 19 20 21 2223 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 64 56 56 57 58 59 60 61 62 63 64 65 66 67 68 69 7071 .
C' THIS. IS A MES: SAGE”. AAA Na A AAA AAA AAA
E'Turs CHARACTER. STRI Nai. Ш o aa
| ILS. CONTIÍINUED'. оао д аа +. ELA Load A A LA A a L. rs Loa Lo
C'TALS CHARACTER PE TS NOT. NT nent: 110
E TAILS STRING HAS MANY. SPECIAL. CHARS. TN ITH # dat
- 4 A i + LOA 4 A LL 4. —— — A
a A LAA AL Aedo A i + E . E... . x Lea La Ae A A Ad AA AA 4
1 E a dde AA A Loa 4 1.4 a À + 1 24004 A en | Lo. 1.44 4 À x ! 1.00 LA 14
1 . 1 . 2 L..L.k L 1 4.4 1 ака + 1 1212 нон а! 1 Даа 1 1 4 1 1 FA k а [E
Figure 2-4. Character Constants
2-5
If the following characters are not preceded by an escape character in a character constant,
they have the meaning given below:
Character Meaning
A character constant is continued on the next line
LL) Encloses the characters of a character constant
Variable symbol
Next character retains its literal value
Hexadecimal String Constant
A hexadecimal string constant is written as the letter X followed by a string of hexadecimal
digits enclosed in apostrophes, such as: X’C49FE’. Each hexadecimal digit is translated into
its four-bit equivalent. The maximum size of a hexadecimal string constant is limited to the
maximum number of digits that can be contained on two coding lines. If an odd number of
digits is specified, the leftmost four bits in the leftmost byte are set to zero. The implied
length of the constant is half the number of hexadecimal digits in the constant, rounded to
the next higher integer.
Packed Decimal String Constant
A packed decimal string constant is written as the letter P followed by a signed integer
number enclosed in apostrophes, such as: P’-244’. If the sign is omitted, the number is
assumed to be positive. Each pair of decimal digits is translated into one byte. The rightmost
byte of a packed field contains the rightmost digit and the sign. Signs generated are “C16”
for plus, and “D16” for minus. The maximum length of a packed decimal string constant is
limited to the number of digits that can be contained on two coding lines.
Zoned Decimal String Constant
A zoned decimal string constant is written as the letter Z followed by a signed integer
number enclosed in apostrophes, for example: Z'246'. |f the sign is omitted, the number is
assumed to be positive. Each decimal digit is translated into one byte. The rightmost byte
contains the sign and the rightmost digit. Signs generated are “C16” for plus, and “D16” for
minus. The maximum length of a zoned decimal string constant is limited to the number of
digits that can be contained on two coding lines.
Integer String Constant
An integer string constant is written as the letter | followed by a signed integer number
enclosed in apostrophes, such as: 1’-246’. If the sign is omitted, the number is assumed to be
positive. An integer string constant is translated into its four-byte binary equivalent. Integer
constants consist of 1-10 digits with a value ranging from -231 to 231-1. The constant is
word aligned when used in a WDD statement or a literal.
2-6
When string constants define data in storage, truncation and padding of their values is
performed according to the rules presented in Figure 2-5. |
Explicit Length= Explicit Length > Explicit Length <
Constant Implicit Length implicit Length Implicit Length
Character C'ABC'(3)=ABC Left justify. Left justify. |
Blank fill on right. Truncate on right.
C'ABC' Warning message is given.
C'ABC'(4)=ABC
C'ABC'(2)=AB
Hexadecimal Right justify. Right justify. Right justify.
Zero fill on left if the Zero fill on left. Truncate on left.
ХОА’ constant contains an Warning message is given.
odd number of digits. X'10A'(3)=00010A
X'10A’(1)=0A
X'10A"(2)=010A
Packed Right justify. Right justify. Right justify.
Decimal Zero fill on left if the Zero fill on left. Truncate on left,
constant contains even Warning message is given.
Р'-24' number of digits. P'-24"(3)=00024D
Р'-24'(1)=40
P'-24'(2)=024 D
Zoned Z2'123'(3)=F1F2C3 Right justify. Right justify.
Decimal Zero fill on left. Truncate on left.
Warning message is given.
Z'123' Z'123'(4)=FOF1F2C3
F'123'(2)=F2C3
Integer Right justify, Right justify. Right justify.
Propagate sign on left. Propagate sign on left, Truncate on left.
I’-758° Sign is lost.
1'-758'[4)=FFFFFDOA 1'-758'(6)= Warning message is given.
FFFFFFFFFDOA
1'-758'(1)=0A
Figure 2-5. Truncation and Padding of String Constant Values
Arithmetic Constants
Arithmetic constants can be used in multi-term expressions. An arithmetic constant is
assembled as its two-byte binary equivalent. The maximum size of an arithmetic constant is
216.1. If arithmetic constants are used in statements where an explicit size is specified,
truncation and padding follow the same rules as those for an integer string constant.
Decimal Arithmetic Constant
A decimal arithmetic constant is written as an unsigned integer number of 1-5 digits, for
example: 20. |
2-7
Hexadecimal Arithmetic Constant
A hexadecimal arithmetic constant is written as quotation marks followed by a string of 1-4
hexadecimal digits, for example: ““2FA. Each hexadecimal digit is assembled as its four-bit
binary equivalent.
Type Example Generated Hexadecimal Code
Character String C'F12AY9*’ C6F1F2C1E8F95C
C'SZH RS 5BE97D7BF5
c's’ C2
Hexadecimal String X'C49FE’ OC49FE
X'F2' F2
xc oC
Packed Decimal String Р'14' 014C
P'925860' 0925860C
Р'-2' 20
Р'-2596' 025960
Zoned Decimal String Z'14' F1C4
Z'925860’ FOF2F5F8F6CO
Z'-2 D2
Z'-2596' F2F5F9D6
Integer String 114 00 00 00 OE
1°925860" 00 OE 20 A4
1-2" FFFFFFFF
I'-2596° FFFFF5DC
Decimal Arithmetic 14 000E
302 012E
57399 E037
Hexadecimal Arithmetic “14 0014
“F2A OF2A
“EO9F EO9F
Figure 2-6. Examples of Assembled Constants
SYMBOLS
A symbol is a character or combination of characters used to represent locations or arbitrary
values. Symbols, through their use in name fields and operands, provide the programmer
with an efficient way to name and reference a program element. A symbol is defined when
It appears in the name field of a source statement.
2-8
In general, symbols must conform to these rules:
1. The symbol must not have more than eight characters.
2. The first character must be a letter, a period, a dollar sign, or an
ampersand (&).
3. The remaining characters may be digits, letters, or dollar signs. If the
first character is a period or an ampersand, the second character must
be a letter or a dollar sign. |
4. The first blank after the start of a symbol terminates that symbol.
5. Symbol definitions cannot be continued.
The assembler has three types of symbols: ordinary symbols, variable symbols, and sequence
“symbols. Sequence symbols and variable symbols are used only for the macro language and
for conditional assembly.
Ordinary Symbols
An ordinary symbol consists of 1-8 alphanumeric characters, the first of which must be a
letter or a dollar sign. Ordinary symbols identify program locations or arbitrary values. The
value of an ordinary symbol may be absolute or relocatable. Examples of ordinary symbols
are:
BETA
X242
SENTRYP1
An ordinary symbol that names an instruction, a storage area, a data definition, or a control
section is the address of the leftmost byte of the identified field. Address values are
relocatable terms. The value of an address symbol must not exceed 216-1.
An ordinary symbol may be defined only once in an assembly. That is, each symbol used as
the name of a statement must be unique within that assembly. However, a symbol may be
used more than once in the name field of a COM or CSECT assembler statement, because
the coding of a control section may be suspended and then resumed at a subsequent point.
Some statements require that a symbol in the operand field be previously defined.
During assembly, the assembler assigns a length attribute to all ordinary symbols. The length
attribute of a symbol is the length, in bytes, of the storage field whose address is represented
by the symbol. For example, a symbol naming an instruction that occupies four bytes of
storage has a length attribute of four.
2-9
Variable Symbols
A variable symbol is a symbol that is assigned different values by the programmer or the
assembler. The three types of variable symbols are:
1. Symbolic parameters — used only in macro definitions; values are
assigned by macro instructions.
2. System variable symbols — used only in macro definitions; values are
assigned by the assembler.
3. Set Symbols — used anywhere in the source program; values are
assigned by SET or GBL statements.
Variable symbols consist of an ampersand (&) followed by one to seven alphanumeric
characters, the first of which must be a letter or a dollar sign. Examples of variable symbols
are:
&BETA
&X24
&P1
Concatenation of Variable Symbols
When a variable symbol is assembled, the current value assigned to the variable symbol is
substituted for the variable symbol. If a variable symbol is immediately preceded or
followed by other characters or by another variable symbol, concatenation of the variable
symbol with another variable symbol or character occurs. To concatenate a variable symbol
with a letter, digit, period, or left parenthesis that follows the symbol, a period must
immediately follow the variable symbol, for example: &VVAL.8. The period merely indicates
the end of the variable symbol and does not appear in the generated code. The size of a
concatenated symbol is limited only by the maximum statement size. However, the
generated symbol is limited by the rules which pertain to the generated name, operation, or
operand field. See Figure 2-7 for examples of the concatenation of variable symbols.
Assume that the following values have been assigned to these variable symbols:
&P1 = ROP
&P2 = 5
&P3 = @
Initial Code Generated Code
&P18P2 ROP5
&P1.8 ROP8
&P3.R7 @R7
B.&P2 B.5
&P1 ROP
703&P2 7035
Figure 2-7. Concatenation of Variable Symbols
2-10
Sequence Symbols
Sequence symbols consist of a period followed by one to seven alphanumeric characters, the
first of which must be a letter or a dollar sign. Sequence symbols can be used in the name
field of any statement except MACRO, GBLA, and GBLC, and in the operand field of only
ADO or AGO statements. The programmer can use sequence symbols to vary the sequence
in which statements are processed by the assembler. Examples of sequence symbols are:
LAST
.HERE
LOCATION COUNTER REFERENCE
A location counter assigns storage addresses to program statements. It is the assembler's
equivalent of the instruction counter in the computer. As each machine instruction or data
area is assembled, the location counter is first adjusted to the proper boundary for the item
(if adjustment is necessary} and then incremented by the length of the assembled item.
Thus, it always points to the next available location. If the statement is named by a symbol,
the value of the symbol is the value of the location counter before addition of the length.
The assembler maintains a location counter for each control section of the program and
manipulates each location counter as previously described. Source statements for each
section are assigned addresses from the location counter for that section. The location
counter for a given control section assigns locations in storage without regard to assignments
made within other contro! sections.
Thus, if a program has multiple control sections, all statements identified as belonging to the
first control section will be assigned from the location counter for section 1; the statements
for the second control section will be assigned from the location counter for section 2, etc.
This procedure is followed whether the statements from different control sections are
interspersed or written in control section sequence.
The location counter setting is controlled by using the ORG and ALIGN assembler
statements. The counter affected by an ORG statement is the counter for the control
section in which it appears. The maximum value for the location counter is 216-1.
The programmer can refer to the current location counter by using an asterisk in the
operand field. The asterisk represents the value of the current location counter at the start
of the current statement. This value is relocatable.
An example of the use of the location counter is:
NAME OPERATION OPERAND
1, 2, 3,4 5 67 81910 11 12 13 14 15 16 17/18) 19 20 21 22 23 24 25 26 27 23 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50,
FE den O a
a a LL косо кк. аа 1 À Lu... A AA ALL AA E ALLA À
E A nada a a ас наф фо ааа a... 021242 0m Ja i „x a ‘a... Аааа аа 4 L L д i i 1 1 a L 1 A de AAA ann A. 4
2-11
If the location counter is at 0100 when this statement is encountered, the following data is
generated:
Location Value
0100 0100
0102 0100
0104 0100
SYMBOL LENGTH ATTRIBUTE
The length attribute of a symbol may be used as a term by writing L' followed by the
symbol, for example: L'SYMX. The length attribute of SYMX is then substituted for the
term. The length attribute of an ordinary symbol is the length, in bytes, of the storage field
whose address is represented by the symbol.
The length attribute of * is invalid. If the operand of an EQU statement is an asterisk or an
arithmetic constant, the symbol defined by the EQU statement has a length attribute of
one. In any other context, the length attribute of an arithmetic constant is two. Examples
of symbol length attributes are shown in Figure 2-8.
NAME OPERATION OPERAND
1234567 8 9 10 11 12 13 14 15 16 17/18) 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
[WDD | led... a
® LYNUM=2 CARITH CONSTANT)... i meas
. LA ee OA AA A NAAA AA Ad AA A AAA AAA AAA AAA
МОМ: оо EQU | R56%*10 a e
] i 1 CARITH CON ST A T. IN. EQU STATEMENT. ) A. AAA a. A
- A ME ken A Boda 4. eu a a 01 Med А OT E A MU a ES E O AL
x
É
=
INST. O NLODD EL RE Aa aaa
CINSTIZ4 CLoDD INSTRUCT.ION LS 4 BYTES LONG)......
EQU E aa
* L' LOG: | CLOCATION CTR REF IN EQU STATEMENT). .....
Cons... | [Eau | THIS STRING! .. .. Ta
* L'CONSE|.I CELEVEN CHARACTERS. IN STRING). .........
INT | WDD. | =26"......
CL'INT=4 (INTEGER STRING. LS. 4 BYTES LONG). ........
а dA— A ‘ a A 1 i Vo зо ава L L i À 1 ) i
a . E e A A Ad A AA AAA AA
LAA Ad AE A A EA a... A AA A AA ade A Ad Lor AA i ‘ 1 —
| sa Edad AAA A e A 4 t Ad AA i O E A E E AA AL AL da AA de LA AA AAA
| A A д x L And La - ca 4 LA + L dad dde A de A L 1 ak A —L
Figure 2-8. Examples of Length Attributes
2-12
LITERALS
A literal term is used to introduce data into a program. The formats of a literal term are as
follows.
=a a = Data value to be generated (required); any legal expression
except another literal term. |
=a(b,c) b = Length specification (in bytes): a positive absolute expres-
sion. If omitted, the length specification is the implied size
=a(b) of the expression.
c¢c = Repetition factor; a positive absolute expression. If omitted,
a repetition of 1 is assumed. If the size or length is specified
symbolically, the symbol must have been previously defined.
Where: | |
Examples of literals are shown in Figure 2-9.
==C ABD" Invalid: literal cannot define another literal.
=C'ABD'(4,3) Valid: same as =C'ABD ABD ABD’
=A+B/2+4 Valid: implied length is the length of symbol A; implied
repetition factor is 1.
=P'-446'(6) Valid: specified length is 6; implied repetition factor is 1.
=X'FF00"(,3) Valid: implied length is 2; specified repetition factor is 3.
Figure 2-9. Examples of Literals
The assembler generates the literal data, stores this data in a literal pool, and places the
address of the stored data in the operand field of the statement using the literal. The
position of the literal pool may be controlled by the programmer with the LTORG
assembler statement. If LTORG is not specified at the end of a control section, the literal
pool for that segment is placed at the end of the first control section.
A literal can be defined at any point in a program by specifying the literal in the operand of
the statement in which it is used. In contrast, data definition statements define and label
data, and then the label is used to specify the data.
A literal may not be combined with any other term, nor may a literal be used as a receiving
field of a statement that modifies storage.
Literals are relocatable, because the address of the literal, not the literal itself, is assembled
into the statement using the literal.
2-13
If duplicate literals are specified within one literal pool, only one literal is stored. Literals
are duplicate if their final specifications, size, and repetition factors are identical on a
character-by-character basis. A literal may be a duplicate even when it appears to be
different (see examples in Figure 2-10). A literal is a duplicate if it contains no forward
references and the expressions evaluate to the same value as the corresponding expressions
of an existing literal.
A literal which contains a reference to the location counter is stored even if it duplicates
another literal (see examples). If an expression used in a literal term contains a forward
reference to a symbol, the symbol is assumed to represent a two-byte value.
Examples of duplicate literals are shown in Figure 2-10.
=C'ABC’(4,3) Only one literal is stored.
=C'ABC'(4,3)
=С'АВС' Both literals are stored.
=X'C1C2C3’
=A+B Only one literal is stored if A and B are predefined symbols,
=B+A
=C<EQ>D Only one literal is stored if C is defined to be equal to D, so that the
=1 expression is equal to 1.
=*+10 Both literals are stored
=*+10
Figure 2-10. Examples of Duplicate Literals
EXPRESSIONS
An expression is defined as one or more terms linked by arithmetic, relational, or logical
operators. Expressions may be single term or multi-term (see examples below).
Single Term Expressions Multi-Term Expressions
29 SYMX+40
“FO A+B/2+10
SYMX (X<OR >‘FOF0)< EQ >(SP2<OR>"FOFO)
* (((A+4)/2+1)*2< AND >"00FF) <EQ >24)
L'SY MX *+L'BETA
P’-240' A+B<LE>SUM
2-14
During assembly, all expressions are resolved to a single value. Figure 2-11 provides an
explanation of all types of operators.
The rules for coding expressions within an operand field are as follows.
1. An expression may not start with an arithmetic, relational, or logical
operator. However, an expression may begin with a unary operator:
positive sign (+), negative sign (-), or logical complement (< NOT >).
A unary operator indicates the state of the numbers it precedes (such
as negative, positive, or complement), rather than indicating an
arithmetic operation (such as addition or subtraction).
2. An expression may not contain two terms in succession.
3. An expression may not contain two operators in succession, except
for the logical operator < NOT >, which may follow the logical
operators <AND>, <OR>, and <EOR>.
4, A multi-term expression may not contain a literal.
5. In a multi-term expression, string constants are restricted to
relational operations.
EVALUATION OF EXPRESSIONS
A single term expression has the value of the term involved.
A multi-term expression is reduced to a single arithmetic value as follows.
1. Each term is given its value.
2. Operations are performed from left to right using the following rules
of precedence:
a. Unary arithmetic operations: positive (+) and negative (-).
b. Arithmetic multiplication (*) and division (/).
с. Arithmetic addition (+) and subtraction (-).
d. Relational operations (<EQ>, <NE>, <LT>, <GT>,
<LE>, and <GE>).
e. Unary logical complement (<NOT>).
f. Logical product (<AND>).
g. Logical addition {< OR >) and subtraction (<EOR >).
2-15
The expression is computed to 32 bits, and then truncated to 16 bits
or less, depending on its contextual use.
Division always yields an integer result. For example, 1/2*10 yields a
zero result, whereas 10*1/2 yields 5. Division by zero is permitted
and yields a zero result.
A relational operation yields a binary result of O or 1. If string
constants are used in relational operations, both relational terms
must be of the same type; thus, P246 <EQ>Z'2406' is illegal.
Logical operations are performed on a bit-by-bit basis equivalent to a
masking operation. A non-zero value is considered true and a zero
value is considered false.
Arithmetic Operators
Operator Meaning Example
+ Addition A+B
Subtraction 10-C
* Multiplication D*16
/ Division 25/X
Relational Operators
Operator Meaning Example
<EQ> Equal to A<EQ>B
<NE> Not equal to A<NE>B
<LT> Less than 17<LT>&P1
<GT> Greater than 69<GT>TAB
<LE> Less than or equal to 73<LE>M
<GE> Greater than or equal to ‘3F<GE>&TAB1
Logical Operators
Operator Meaning Example
<NOT> Logical complement (one’s <NOT>A
complement)
<AND> Logical product A<AND>B
<OR> Logical addition (inclusive or) A<OR>B
<EOR> Logical subtraction (exclusive or) A<EOR>W
Figure 2-11. Types of Operators
2-16
Parentheses are used in the normal role of arithmetic grouping to change the order of
evaluation. Parenthesized parts of an expression are evaluated before the rest of the terms in
the expression. In the case of nested parentheses, the innermost parentheses are evaluated
first. For example, the expression ((A+4)2+1)*B is evaluated as follows, if A=10 and B=3.
1. A+4 = 14 giving (14/2+1)*B
2. 14/2 = 7 giving, (7+1)*B
3. 7+1 = 8 giving 8*B
4. 8*В = 24 giving 24
ABSOLUTE AND RELOCATABLE EXPRESSIONS
An expression is absolute if its value is unaffected by program relocation. It is relocatable if
its value is changed by program relocation.
Absolute Expressions
An absolute expression may contain relocatable terms (RT) alone, or in combination with
absolute terms (AT), provided the following conditions are met.
1. The relocatable terms must be paired or used in a relational
operation. The terms in a pair must have opposite signs, but do not
have to be contiguous, as in the example: RT+AT-RT. Each pair
must be relocated to the same location counter. |
2. A relocatable term or expression must not enter into a
multiplication, division, or logical operation. For example:
RT-RT*10 is invalid, while (RT-RT)*10 is valid.
3. The result of a relational operation is absolute regardless of the
relocatability of the terms or expressions used in the operation.
4. Relocatable terms or expressions used in a relational operation are
considered absolute. The relocatability attribute is disregarded. Thus
RT<LT>RT is valid even if the two terms or expressions do not
appear in the same control section.
5. If an expression that enters into a relational operation has multiple
relocation attributes, an error indicator is given and the operation is
performed as if the value of the expression were absolute, for
example: RT<EQ>RT1+RT2. —
2-17
Relocatable Expressions
A relocatable expression reduces to a single relocatable value. A relocatable expression may
contain relocatable terms alone, or in combination with absolute terms, provided the
following conditions are met.
1. All the relocatable terms but one must be paired, or be involved in a
relational operation.
2. The leftover relocatable term must not be directly preceded by a
minus sign.
3. No relocatable term may enter into a multiplication, division, or
logical operation.
Examples of Absolute and Relocatable Expressions
The following examples illustrate absolute and relocatable expressions. A is an absolute
term: BR1 and CR1 are relocatable terms within the current control section. XR2 is a
relocatable term in a control section different from that in which BR1 and CR1 are defined.
Examples of absolute and relocatable expressions are:
Absolute Expressions Relocatable Expressions
A-BR1+CR1 A*A+BR1+XR2-CR1
A BR1
BR1+A-CR1 BR1+CR1-*
BR1+(XR2<LT>CR1)+A-CR1 (BR1<EQ>XR2)*10+CR1
CODING FORM
Figure 2-12 illustrates a source code form provided for convenience to the programmer and
the keypunch operator. Since assembler statements are free form, the various fields (name,
operation, operand, and comment) need not begin in any specified column. The only
restrictions are that the fields appear in the sequence shown, be separated by one or more
spaces, and the name field begin in column 1. If the name field is omitted, the operation
field can begin in any column after column 1.
All statements are contained in columns 1 through 72. Columns 73 through 80 are reserved
for identification and statement sequencing. Thus, column 1 is called the begin column and
column 72 the end column. The standard begin and end columns can, however, be altered
by the ICTL assembler statement. (This statement is described in Chapter 6. Program
Control Statements.)
2-18
6l-C
MIENIOREX
Assembler Coding Form
Punching Instructions
sane | | | | | |
Prch | 1111
NAME
OPERATION
OPERAND
IDENTIFICATION
12 34 5 67 89
10 11 1213 №4 15 16 17| 18
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 7071 72
73 74 75 76 77 78 79 80
шло ерод волпо$ ‘21-5 e.nBIJ
H x ~ a a * = dd aL LA 1 1 д —. 4 + + L i 1, L À 1 + 3 L i ad A i 4 1 1 I + 4 + 4 Их À L Lodo de ELA LEE DAA. AA 1 + 5 1 1 |] d. 4 À
La на a. oa AA — Lo oA AA Ad Al ¿a A + 1 +. 4 A L 1 1 . + A LL. +, A 1 1 L 1. . . 3 4 Li Lo. + ..i. 4 A 1 i L д E i ; 1 L 1 1 I E 4
E 8e 1 1 EP dem = pa 1-2 A a da AA ALA AA ALLA. A E LL x i À i ? kh 4 4 L + 1 La A LÀ. + a LIA а fa A £ + À i 1 4 L E i i + 2
Do Aa dE A A Ad AA. a Г 4 1 x 4 Г ма Ао в. а ааа AE e L A 1 + 4 L 1 1 L Lon A ix uv A я 1 L 1 1 1 1 1 À
[AL ed DA A LAA LLE AE ALA À E id... 2 4 4 Lt 1 8 1 1 i k A ГОДЫ | x 1 1 es a i 1 ra ааа. ДО оо В Lo... LA. À L L 4 } 1 Lo. aid,
+ A x i - x L. E 1 i 1 4 1 À 4 д, 1 + i a 3 L Er. À д. + E + “ A A L + L L + A L a E
L LA 4 i м de a L i 1 + L L À. 1 x £ L A + E L 1 1 i] + x 1 À L д L 1 À L À £ 1 1 + 1 3. i 1 A 1 + L E 1 L L 1 L L \ i + + L L À 1 L 1 i A
L 4 1 A + 1 | A + L i L] 1 L A 1 в 1 1 1 i 1 1 2 1 1 E + À + 1 + 1 1 1 1 1 L A, i L E 1 x 1 1 a L A L i 1 1 + L 2 1 1 3 1 A 1 4 L i
L "a J, 1 À 4 L * + i 1 1 1 : £ 2 - + 1 1 1 i 1 1 1 1 A Det 1 4 + 1 4 4 } 1 L 1 + A MT 3 À E E i L [| 1 3 1 A 1. 1 + L tt oa 1 L A 1 J : + 1
L. + 4. Rd. re + 1 1 sos + A 1 À 1 A 4. + 1 1 L 1 1 1 Г L 1 eL LA ra 1 Г + E Lu A A i 1 4 I E 4 + rs A i E 1
bm A a la - — a — | - a. Ps a L Le. _a i FR 2 i 1 + ba. A A i + L A 2 JF ET SN fr A A i _ LU x 1 Г A i a + 1 an x. A Anh a À i + + A A 2,
{40 24 1. À а a _ nt ns. vu LE AAA a AAA LAA EME AA AA id ! LA A 4 A EM L L A Lk it 4 4
Lo. аа а A x x = 4 I A 1 À. 1 1 1 5 2 Г а 1 i a РИ e nk i 1 x à L ox. La +, a L L 1 X. [N An L 3 i 4 4 1 2 + 1 z [3 L 1 L +
po EE ER AA An ЗАЩ AN A x + i » 2 L 1 4 LA 1 1 1 Dd. A 4 4 dd 2 + + LE. i La A de LA AAA À L dn be A, 1 x + 1 3 1 L 1 т 1 4 L L
ld A A A LL 2 A La А. A. he eh i A E д 1 + E. Ae ok i du A 1 1 я 4 e 1, в x аа E i a La A AAA A LoL Am mde 1 д д ща 1 1 L E Il L 1 i L 4
ни 1 L ak La de. LS L x de, À x A x L + Lo A x aL L || +. —]- Lada o Lk À, Le. 3 A —t A i Ra Ги + A A. 1 L a A À nm À 1 A i 1 L 1 д À
fado A A Leda A da » + A 3 = da 1 4 da dea al A А. + 1 1 1 L Laa 1 4 1 X + A 2 i L 1 За д Ай L . AL. A 1 1 A A, L L + + 1 1 A 1 A 5 i 1
1 1 a L id L L д. 1 x À. A д + — E À L 1 L À 1 L L 1 A. 1 1 L 3 a 1 + 2 Lt 1 A 1 L L 1 1 i À x A 1 L E 1 À Ин 1 + i + LL i L E Д + L + 1 L
1 À À L A J i 4 + i L 1 a 1 i 1 1 i 3 1 A 1 L 1 1 A 1 1 1 1 I À. A 1 1 A o 1 L 1 À A A, J 1 i A dL LA A de A L À i i i 1 1 1 |. 1 + L L À il À L i J
1 + i i 4 E 4 L 1 д L i A + de i L 1 a L 1 1 1 1 L 1 L L 1 + 1 t L 1 L 1 1 1 si 1 x 1 LL 4, 1 4 tt AL det. À Le h 1 L L L L J 1 + 1 A 2 + 1 _ +
1 1 1 L + 1 1 1 1 Л L x * a x + L + A E x + ra 1 2 L 3 4 L Le. A A 4 1 L 1 A 1 + 1 L A
1 Ln 1 L à + i L ки + hn i i 4 A i i E i 1 L L A я i E li 1 L i 1 +, L, i, 2 1 + 1 a + +
A x e a de L + 1 i i un 2 1 4 1 1 E } i L Г 1 A 1 4 _ Ex + i A A AA Ada A AE A + db + 1 1 A E L A a1 L 1 1 E
E + 1 L 1 L L 1 1 L a L + i L 1 L В L L + 1 1 A 1 4 L i + 1 1 x 1 1 L 1 L i + 1 L L i L 1 A + 4 I 1 1 L 1 A A A y Lo i 1 1 1 i L i 1 1 i | L 1 L L
1 2 34 5 6 7 8/9/10 11 121314 15 16 171 18/ 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 33 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 7071 72173 74 75 76 77 78 79 80
x L i i : + | L LJ 1 + 2 1 J 1 + 2 L de 1 Ja du x | + L : т + a i + + + de + de 1 + 1 1 y ri £ 1 1 de Lt A ln d я da + | + A 1 1 sde + 1 alo i ; a las y я nm т es
NAME FIELD
If the name field is included, it must begin in the begin column (column 1). If the name
field is omitted, the begin column must be blank. A name cannot be more than eight
characters long after substitution, and cannot be continued on the next line.
OPERATION FIELD
The operation field begins after the first blank column. More than one blank column can
separate the name field and the operation field: however, within the operation field, blanks
are not allowed. The operation field after substitution cannot be more than eight characters.
It cannot be continued.
OPERAND FIELD
Operands identify or describe data used in a statement. An operand may be actual data, a
storage address, a register number, a field length, mask, etc. A comma must separate
operands; embedded blanks or spaces are not allowed, except in strings.
COMMENT FIELD
To include comments on the same line as an existing statement, the programmer must begin
the comment at least one space after the operand field. A comment cannot extend past the
end column (column 72). An asterisk (*) or a period and asterisk (.*) starting in the begin
column indicate a comment statement. The asterisk is used for commentary notes on the
source program; the period and asterisk are used for comments in a macro definition.
Comments do not affect the assembled program, but are printed in the assembly listing.
The following example illustrates the name, operation, operand, and comment fields. LOAD
REGISTER on the first line is a comment because a space separates it from the last operand.
The asterisk on the second line in column 1 specifies that all characters on that line are
comments.
NAME OPERATION OPERAND
12 34 567 8] 9 | 10 11 12 13 14 15 16 17] 18} 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40,41 42 4344 45 46 47 48 49 50,
EGIN |105 . |ITAG.I LOAD REGISTER ... .........
xP FROM TAG Nas
a AA A Je E ALA AAA i .. AA AA A A Re dere A A nd OA A AID de A
IDENTIFICATION-SEQUENCE FIELD
The identification-sequence field is used for identification or sequencing of statements. This
optional field is normally contained in positions 73-80. The contents of the field appear in
the source listing. The programmer may verify the statement sequence by the use of the
ISEQ assembler statement (discussed in Chapter 6).
2-20
STATEMENT CONTINUATION
A semicolon (;) indicates that a statement is continued to the next line. The first non-blank
character in the next line is the start of the continuation line. Therefore, a blank cannot be
the first character of a continuation line. Only one continuation line is allowed for source
statements, except for macro instructions, prototype statements, and GBL statements. Any
characters after a semicolon are ignored by the assembler and considered as comments. A
semicolon preceded by an escape character retains its literal value. The first non-blank
character of a continuation line cannot be a semicolon; nor can a continuation line be
entirely blank.
The operands in the following example are two character constants: ACCOUNT; and
TOTAL EQUALS THE FOLLOWING. The first semicolon retains its literal value because it
is preceded by an escape character. The second semicolon indicates to the assembler that the
second operand is continued on the next line beginning with the first non-blank character.
HEADINGS, which appears after the semicolon, is a comment. Note that the blank between
TOTAL and EQUALS must be coded on the first line, not in the continuation line.
NAME OPERATION OPERAND
1234567 89 10 11 12 13 14 15 16 17181 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 33 40 41 42 43 44 45 46 47 48 49 50
авантюра ть оон оон анны,
BEGIN Hop "ACCOUNT#;!C'TOTAL - j HEADINGS.
e a EQUALS. THE "FOLLOWING:
LA LAA AL AA dE RA A > A. Ad A Lk AL 4024202 4e 11 e Ed. LL
2-21
3. MACHINE INSTRUCTIONS
SOURCE STATEMENTS
Machine instruction source statements consist of:
e Name field (optional)
e Mnemonic operation code
e Operand field
e Comment field (optional)
An example of a machine instruction source statement is given below. (The data flow of
most machine instructions is operand 1->operand 2.)
NAME OPERATION OPERAND
1234567891011 1213 14 15 16 17/18) 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43.44 45 46 47 48 49 50,
desd ooo À
NAMIZ | LOD. . | AMOUNT(RI),RA THIS SETS UP, R2
INSTRUCTION ALIGNMENT AND CHECKING
All machine instructions are aligned by the assembler on even-byte boundaries. The
assembler advances the current location counter the amount necessary to ensure correct
alignment of the assembled instructions. The contents of the area between the prealignment
location counter and the postalignment location counter is unchanged. All expressions that
specify storage addresses are checked to ensure appropriate alignment for the instruction
format in which they are used. |
OPERANDS AND SUBOPERANDS
Machine instructions have 0, 1, or 2 operands. Operands are written as a single operand, or
as an operand with 1 or 2 suboperands. The possible formats of an operand are shown
below.
op
op (subop)
op(,subop)
op (subop,subop)
3-1
Operands specify immediate values, memory locations, or general register numbers, while
suboperands specify explicit lengths or index registers.
If indexing is not desired for an instruction, the suboperand used for indexing is omitted.
General register zero cannot be used by machine instructions as an index. Its specification as
an index is flagged as an error.
The at-sign (@) in the first character position of an operand specifies indirect addressing of a
memory address or general register, as in the following example.
NAME OPERATION OPERAND
12348567 8/9/1011 1213 14 15 16 1718) 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 4344 45 45 47 48 49 50_
LOD . | BADDRESCREGI),@REGZ ..... . |
1 1 a - - Aa + i дя + 1 SL LL ad de. Ad. à d -1 1 1 -
-— Lr. +. 4
NAME AND LENGTH ATTRIBUTES
Any machine instruction statement may be named by a symbol, to which other assembler
statements can refer. The value attribute of the symbol is the address of the leftmost byte
assigned to the assembled instruction.
The length attribute may be 2, 4, 6, or 8, depending upon how many bytes are used for an
instruction.
The length field of 6 or 8 byte instruction formats can be explicit or implied. To imply a
length, the length suboperand is omitted. The omission indicates that the length field is
either the length attribute of the expression specifying the effective address, or the length of
the literal.
The length attribute of an expression is the length attribute of the leftmost (or only) term in
the expression.
NOTATION USED TO DESCRIBE MACHINE INSTRUCTIONS
The source formats of the operands are defined using the following symbols.
Op Code The operation codes are presented in hexadecimal (00 through FF).
R Absolute expression specifying a general register number, 0-7. The register
may be used as a sending or receiving field (0-7), or as an index register
(1-7 only).
E Absolute expression specifying an extended register, 0-15 (for RDX and
WRX only).
M Absolute or relocatable expression that specifies a memory address,
0-65,535.
3-2
| An absolute expression specifying an immediate value: the value varies
depending on the instruction. The value may represent an amount used in
an arithmetic operation, a shift count, a skip count, or a bit number.
L Absolute expression specifying a field length, usually 0-255, but longer for
some instructions. For certain instructions the length of an operand field
may be defined in the instruction. The length specified in the instruction
overrides any previous field length definition, but is only in effect for that
instruction.
@ An at-sign (@) in a source operand indicates indirect addressing, an
optional feature. For the instructions in which a register is a sending or
receiving field, the at-sign indicates indirect addressing for R1 or Ra. If a
field in memory is the sending or receiving field, the at-sign indicates
indirect addressing of M1 or M2.
() Index registers and field lengths are optional; they are enclosed in
parentheses in a source operand. A source operand using both an indexing
and a field length specification would be represented like this:
M1(L1,R1). The comma in the parentheses must not only be coded when
both the length and index register are used, but also if the second operand
is used, as follows: M1(L1) or M1(,R1). This enables the assembler to
distinguish between the two specifications in parentheses.
e A bullet following a mnemonic indicates the operands are
byte-addressable; all other operands are word-addressable only.
An R, M, 1, or L in source operand 1 is identified as R1, M4, 11, or L1; in source operand 2
they are identified as R2, M2, |2, or L2.
The two major operand fields must be separated by a comma; no blanks are allowed
anywhere in the operand fields.
Remember that the at-sign and any designations in parentheses (field length and index
registers) are almost always optional; if any of these designations are not optional, this fact
will be noted. Data flow is usually operand 1 to operand 2, unless stated otherwise.
i mee mr
SUMMARY OF MACHINE INSTRUCTIONS
The MRX 40/50 System machine instruction set is divided into two major categories:
General-Purpose instructions and System instructions. General-purpose instructions are the
instructions needed to solve most data processing problems using a defined software system.
System instructions are specialized instructions used to interpret and alter a software
system.
3-3
The General-Purpose instructions may be used at any time; the System instructions require
certain preconditions and cautions. For information on using the System instructions refer
to the publication 7200 or 7300 Processing Unit Reference.
Within these two major categories, the instructions are divided into functional groups, and
these functional groups are listed in alphabetical order, as shown in the following table.
General Purpose Instructions System Instructions
Arithmetic Control
Bit-Oriented 1/0
Boolean Logic
Branching
Compare
Control
Data Conversion
Data Transfer
Shift
Optional: Floating Point
The instructions in each functional group are listed alphabetically by mnemonic. This rule
holds for all instructions except for logical pairs or groups of instructions — these
instructions are listed alphabetically according to the first instruction of the pair. For
instance, PAKX (Pack) will be followed by UNPX (Unpack), and SB (Skip Back
Unconditional) will be followed by SF (Skip Forward Unconditional).
3-4
GENERAL-PURPOSE INSTRUCTIONS
Arithmetic
Mnemonic Name Code _Lgth Operands
ADD Add Memory-Register A2 4 @М (R1),GR>
ADDD Add Direct B2 4 14(R1),GR9
ADDI Add Immediate 32 2 11,@R5
ADDK Added Packed Decimal e — 52 8 Ma (Lq,R4),Mo(Lo,Ro)
ADDM Add Memory-Memory 62 6 EM (R1),GM2(R>)
ADDR Add Register-Register 22 2 @R,,@R9
ADDT Add Two-Word 72 4 @My(R1),@R9
DIV Divide Memory-Register A9 4 @My(R4) @R9
DIVD Divide Direct B9 4 ly(R4) @R2
DIVK Divide Packed Decimal e 7C 8 M4(L4,R4), Ma(La,R9)
DIVI Divide Immediate | 39 2 1,,@R7
DIVM Divide Memory-Memory | 69 6 @M4(R41),@M (Ro)
DIVR Divide Register-Register 29 2 @R1,@R»
MPY Multiply Memory-Register A8 4 @M4(R4),@R9
MPYD Multiply Direct a B8 4 14 (R4) @R9
MPYI Multiply Immediate 38 2. M@R,
MPYK — Multiply Packed Decimal e 5B 8 M4(L4,R1),M9(L9,R9)
MPYM Multiply Memory-Memory 68 6 @My(R4),@M4(R2)
MPYR Multiply Register-Register 28 2 @Ry,,@R9
SUB Subtract Mernory-Register A3 4 @M4(Ry) @R9
SUBD Subtract Direct B3 4 11{R1),@R,
SUBI Subtract Immediate 33 2 11.@R9
SUBK Subtract Packed Decimal @ 53 8 M4 (L4,R1),Mo(Lo,Ro)
SUBM Subtract Mernory-Memory | 63 6 @My(R1) @M9(R29)
SUBR Subtract Register-Register | 23 2 OR ,OR5
SUBT Subtract Two-word 73 4 @My(Ry) @R9
ZADK Zero and Add Decimal e | 50 8 M4 (Ly,R4),Mo(Lo,Ro)
Bit-Oriented Instructions
IBIT Invert Bit ® BF 4 @My(R4),19
ROFR Reverse Off-Bit 6F 2 @Ry,@Ry
RONR Reverse On-Bit 6D 2 @R,,@R9
SBIT Set Bite BC 4 @My(R4),19
RBIT Reset Bit e BD 4 @My(R4).l9
TBIT Test Bite BE 4 OM (В1) 12
TOFR Test for Off-Bit | GE 2 @Ry,.@R9
TONR Test for On-Bit 6C 2 @R,,@R9
Boolean Logic Instructions
AND Logical Product Memory-Register | A5 4 OM (R1),OR>
ANDD Logical Product Direct B5 4 11 (R1),GOR9
Boolean Logic Instructions (Continued)
Mnemonic Name Code Lgth Operands
ANDI Logical Product Immediate 35 2 14,0R>
ANDM Logical Product Memory -Memory 65 6 ©Mq(R1),@M5(R»)
ANDR Logical Product Register-Register 25 2 @R1,@R,
EOR Exclusive OR Memory-Register A6 4 @M1(R1),@R5
EORD Exclusive OR Direct B6 4 11(R1),GR>
EORI Exclusive OR Immediate 36 2 14,@R»
EORM Exclusive OR Memory-Memory 66 6 @M4(R1),0M5(R5)
EORR Exclusive OR Register-Register 26 2 @R4,@R,
IOR Inclusive OR Memory-Register A7 4 @М (R1), GR,
IORD Inclusive OR Direct B7 4 11(R1),ER>
IORI Inclusive OR Immediate 37 2 14, ©R9
IORM Inclusive OR Memory-Memory 67 6 @M4(R1),@M>(R»)
IORR Inclusive OR Register-Register 27 2 @Ry,@R9
Branching Instructions
B Branch (post-indexing) ED 4 OM (R1)
BA1 Branch Add One E4 4 @My(R4),@R9
BA2 Branch Add Two E5 4 @My(R4),@R9
BCF Branch on Condition Register False E9 4 @My(R1),19
BCT Branch on Condition Register True ES 4 OM (Ry).
BCH Branch Uncond. (pre-indexing) EC 4 OM (R1)
BOF Branch if Bit Off E2 4 @My(R4),l9
BON Branch if Bit On E3 4 @My(R1),19
BR Branch to Address in Register EB 2 OR
BRN Branch if Register is Not Zero E1 4 @M4(R4),@R»
BRZ Branch if Register is Zero EO 4 AM (R1),GR>
BS1 Branch Subtract One E6 4 @My(R4) @R9
BS2 Branch Subtract Two E7 4 OM (R1),OR>
BSR Branch and Save Return EA 4 OM (R1),OR>
SB Skip Back - Uncond. BB 2 |
SF Skip Forward - Uncond. BA 2 |
SCFB Skip on Condition False - Back 48 2 14,19
SCFF Skip on Condition False - Forward 49 2 4,19
SCTB Skip on Condition True - Back 4A 2 11,
SCTF Skip on Condition True - Forward 48 2 14,12
SRMB Skip if Reg. Minus - Back 47 2 14,Ro
SRMF Skip if Reg. Minus - Forward 46 2 11.Ro
SRPB Skip if Reg. Plus - Back 45 2 ‚Во
SRPF Skip if Reg. Plus - Forward 44 2 ‚Ро
SRNB Skip if Reg. Not Zero - Back 43 2 ‚Во
SRNF Skip if Reg. Not Zero - Forward 42 2 I1.Ro
SRZB Skip if Reg. Zero - Back 41 2 11,R9
SRZF Skip if Reg. Zero - Forward 40 2 ‚Вэ
3-6
Compare Instructions
Mnemonic
CBY
CBYM
CMP
CMPD
CMPI
CMPK
CMPM
CMPR
CMPT
CMPX
Name
Compare Byte Memory-Register e
Compare Byte Memory-Memory e
Compare Memory-Register |
Compare Direct
Compare Immediate
Compare Packed Decimal e
Compare Memory-Memory
Compare Register-Register
Compare Two-Word
Compare Characters e
Control Instructions
Code
F9
6B
A1
B1
31
51
61
21
71
55
Lgth
© S5> NO ON BOB
Operands
@My(R,),@R9
@M4(R4) @My(R9)
@My(R4),@R9
|| (В, ) OR9
|1,.@R9
My(L4,R4),Ma(L9,R9)
@M4(Ry),@M9(R9)
OR 1,ER5
@M4(R,) @R9
My (L4,R4),M9(L9,R9)
General Purpose Control instructions can be used at any time without preconditions; compare with System
Control instructions.
NOP
RDX
SR
No Operation
Read Extended Register
Service Request
Data Conversion Instructions
CVB
CVBT
CVD
CVDT
EDTX
PAKX
UNPX
TRNX
Convert to Binary e
Convert to Binary Two-Word e
Convert to Decimal e
Convert to Decimal Two-Word e
Packed Decimal/Alpha Edit e
Pack e
Unpack e
Translate e
Data Transfer Instructions
CLDR
CSTR
INV
INVD
INVI
INVM
INVR
LOD
LODB
LODD
LODI
LODT
MOVB
Condition Register Load
Condition Register Store
Inverse Move Memory-Register
Inverse Move Direct
Inverse Move Immediate
Inverse Move Memory-Memory
Inverse Move Register-Register
Load Memory-Register |
Load Byte e
Load Direct
Load Immediate
Load Two-Word
Move Byte e
3-7
EE
FO
13
AA
AA
AB
AB
57
58
59
56
2B
- 2A
A4
B4
34
64
24
АО
F7
BO
30
70
6A
N
OO © © © в SS +
© SNS SS 5 &© NS SN N
Blank or @My(R4),R9
E1,R9
ly
EM (R1),Ro
EM 1 (R1),Ro
EM (R4),R>
OM (R4),Ro
M4(L4,R4),Ma(L9,R9)
M4(L4,R4),M9(L9,R9)
My(L4,R4),M9(L9,R9)
M4(R4),M9(L9,R9)
GR
OR
M1 (R1),GR>
14 (R1),ORo
14,@R9
@My(R4) @M9(R9)
@R,,@R7
@M4(R4),@R9
@M1(R1),@R»
14(R1),@Ro
14,@R»
@M1(R1),@R5
EM (R4),EMo(R>)
Data Transfer Instructions (Continued)
Mnemonic
MOVL
MOVM
MOVR
MOVX
PSTR
STO
STOB
STOT
Shift Instructions
ARDI
ARDR
ARSI
ARSR
LLDI
LLDR
LLSI
LLSR
LRDI
LRDR
LRSI
LRSR
RLDI
RLDR
RLSI
RLSR
SHFK
Name
Move Long e
Move Memory-Memory
Move Register-Register
Move Characters e
Program Address Store
Store Memory-Register
Store Byte e
Store Two-Word
Arithmetic Right Double Shift -
Immediate
Arithmetic Right Double Shift -
By Register
Arithmetic Right Single Shift -
Immediate
Arithmetic Right Single Shift -
By Register
Logical Left Double Shift - Immediate
Logical Left Double Shift - By Register
Logical Left Single Shift - Immediate
Logical Left Single Shift - By Register
Logical Right Double Shift - Immediate
Logical Right Double Shift - By Register
Logical Right Single Shift - Immediate
Logical Right Single Shift - By Register
Rotating Left Double Shift -
Immediate
Rotating Left Double Shift -
By Register
Rotating Left Single Shift - Immediate
Rotating Left Single Shift - By Register
Shift Packed Decimal e
Floating Point Instructions (Optional)
ADDF
CMPF
DIVF
FLT
FLTT
INT
INTT
LODF
MPYF
NEGF
Add Floating Point
Compare Floating Point
Divide Floating Point
Convert Fixed to Float
Convert Fixed to Float Two Word
Convert Float to Fixed
Convert Float to Fixed Two Word
Load Floating Point Register
Multiply Floating Point
Negate Floating Point Register
Code
БА
60
20
54
ЗА
FA
F8
FB
5F
3F
4F
2F
5C
3C
4C
2C
5D
3D
4D
2D
BE
3E
4E
2E
3B
86
87
89
82
82
81
81
84
88
80
Lgth
Co
NN NN NN NNNN SS HN ON ©
N BA NDNNN SA +5
Operands
М, (Lq ,R1),M9(R9)
@My(R4),@M9(R29)
@R,,@R79
M4(L4,R4),M9(L9,R9)
OR
@My(R4),@R2
@My(R4) @R9
@М (R1),OR>
14,Ro
@R4,Ro
14,R2
@R4,Ro
11,Ro
@R1,R»
11,Ro
@R4,R29
11.R9
@Ry,R9
14,Ro
@R4,R9
‚Вэ
@R4,Ro
14,Ro
@R4,R9
My (L4y,R4),19(R9)
@M4(R1),R9
@My(R1)
@My(R4),R9
©R 4
@R4
@R4,R;
ER 1,R2
@My(R4),R9
@M4(R4),R9
Floating Point Instructions (Optional) (Continued)
Mnemonic Name
STOF Store Floating Point Register
SUBF Subtract Floating Point
SYSTEM INSTRUCTIONS
Code
Lgth Operands
8A 4 @M4(R4)
85 4 @My(R1),R2
Privileged and restricted classes; consult 7200 or 7300 Processing Unit Reference manual for information
on the use of these system instructions
Control Instructions
CTB Clear Tie-Breaker Register
TST | Test and Set Tie-Breaker Register
BCM Branch to Control Memory
RAR Read Any Register
WAR Write Any Register
RRO Read Register - Option Register
WRO Write Register - Option Register
SAR Save All Registers
RSAR Restore All Registers
SBA Set Busy/Active Register
RBA Reset Busy/Active Register
SCN Set Control Register
RCN Reset Control Register
SPM Set Privileged Mode Register
RPM Reset Privileged Mode Register
WRX — Write Extended Register
1/O Instructions
DIO Disc Input/Output
INP Input from 1/0 Register
OUT Output to 1/0 Register
RDC Communications Input/Output
WRC Communications Output
SIO System Input/Output
3-9
Code Lgth Operands
12 2 E
11 2 HH
EF 2 R1.19
FE 4 11(R;),ER?
FE 4 14(R4),@R9
FD 4 ly(R4) @R2
FD 4 14(R4) @R9
FF 4 M1(R1),l1p or M4(R4),@R9
FF 4 M4(R4),19 or M4 (R4),GR9
10 2 14,19 or OR 1,19
10 2 14,19 or OR 1,19
14 2 11,19 or OR 4,19
14 2 11,19 0r GR 1,12
15 2 14,19 or OR 4,19
15 2 14,19 or OR 1,19
FO 2 Eq.Ro
F2 2 @R4,Ro
F5 2 11,0R2
F6 2 11,0R2
F3 2
F4 2 R1.R2
F1 2 @R,R2
SUMMARY OF EXTENDED MNEMONICS
The assembler provides extended mnemonic codes which allow unconditional skips, and
conditional skips and branches to be written in a symbolic form that is easier to use than
standard machine instructions. The assembler translates the extended mnemonic codes into
machine instruction object code.
Extended mnemonic codes for skip instructions do not specify the forward (F) or backward
(B) direction of the skip. Thus, the extended mnemonic, S, can be used instead of the SF or
SB machine instruction. The assembler determines the direction of the skip for the S
instruction from the memory address or immediate value in the operand. For example, S
DOG skips to the address, DOG, whether DOG is before or after the present location
counter.
Extended mnemonic codes for branch and skip instructions that test the condition register
specify the condition in the mnemonic itself rather than in the operand for example. SOV
ADDRS skips to ADDRS if overflow has occurred. The standard machine instruction names
the direction and the bit status in the mnemonic, and the actual bit number tested in the
operand. Thus, the extended mnemonic SOV 4 is the same as the standard instruction SCTF
4,0. (Bit O of the condition register is the overflow bit.)
The extended mnemonic codes are grouped as follows:
e Address Coded Skips
e After Arithmetic Instructions
e After Compare Instructions — Arithmetic Test
e After Compare Instructions — Logical Test
e After Decimal Instructions
e After PAKX Instruction
e After TBIT Instruction
e Conditional Register Test
Just as for the standard instructions, indirect addressing and indexing are optional for the
extended mnemonic codes.
3-10
EXTENDED MNEMONIC CODES
Address-Coded Skips
Extended Code
Machine Instruction
S M4 or 14 SF
— SB
SRZ M4,R9 or 14,R2 SRZF
SRZB
SRN M4,Ro or 14,Ro SRNF
SRNB
SRP M4,Ro or 14,Ro SRPF
SRPB
SRM M4,Ro or 14,Ro SRMF
SRMB
|,
14
14,Ro
14.R2
l4,R2
l4,R9
11.R2
11.R2
14,R2
Meaning
Skip forward or backward
Skip if reg. is zero, forward or
backward
Skip if reg. is non-zero forward or
backward
Skip if reg. is plus, forward or
backward
Skip if reg. is minus, forward or
backward
For S, the 14 value = -255 through +255; for all other extended mnemonics in this category, 14 =-15
through +15.
For SF and SB, the 14 value = 0-255; for all other regular instructions in this category 14 = 0-15.
After Arithmetic Instructions
BOV EM(R1) BCT
BNV EM(R1) -— BCF
BCY @My(Ry) BCT
BNC @Mq(Rq) BCF
SOV Miorl, SCTF
SCTB
SNV Му ог! SCFF
SCFB
SCY M4 or |, SCTF
SCTB
SNC М1 or | SCFF
SCFB
@My(R4),0
@M1(R1),0
@My(R4),3
OM (R1),3
14,0
11,0
117,0
11,0
14,3
14.3
14,3
14,3
Branch if overflow
Branch if no overflow
Branch if carry
Branch if no carry
Skip if overflow
Skip if no overflow
Skip if carry
Skip if no carry
1 =-15 through +15 for the extended instructions. 14 = 0-15 for the regular instructions.
After Compare Instructions — Arithmetic Test
The arithmetic test tests the result of a signed arithmetic compare between operand 1 and operand 2. In
the following table, 1 and 2 under Meaning refer to the signed values of operands 1 and 2.
‘Extended Code
Machine Instruction
BGT @Mq(Rq) BCT
BLT @M4(R4) BCT
BGE EM (RI) BCF
BLE @Mq(Rq) BCF
BEO EM (R1) BCT
BNE @M4(Ry) BCF
@M4(R4),1
@M4(R4),2
@M4(R4),2
@My(R4),1
@My(R1),3
@M4(R1),3
3-11
Meaning
Branch if 1 GT 2
Branch if 1 LT 2
Branch if 1 GE 2
Branch if 1 LE 2
Branch if 1 EQ 2
Branch if 1 NE 2
After Compare Instructions — Arithmetic Test (Continued)
Extended Code Machine Instruction Meaning
SGT My or 14 SCTF 14,1 Skipif 1 GT 2
SCTB 14,1
SLT My or I4 SCTF 14,2 Skipif 1 LT 2
SCTB 14,2
SGE M4 or |4 SCFF 14,2 Skipif 1 GE 2
SCFB 14,2
SLE M4 or |4 SCFF 14,1 Skipif 1 LE 2
SCFB 14,1
SEQ M4 or 14 SCTF 14,3 Skipif1 EQ 2
SCTB 14,3
SNE My or l4 SCFF 14,3 Skipif 1 NE 2
SCFB 14,3
14 =-15 through +15 for extended instructions. 14 = 0-15 for regular instructions.
After Compare Instructions — Logical Test
The logical test tests the results of an unsigned arithmetic (logical) compare between operand 1 and operand
2. In the following table, 1 and 2 under Meaning refer to the unsigned values of operands 1 and 2. CMPX
and all variations of the CBY instruction always yield a logical result.
Extended Code
Machine Instruction
Meaning
BLGT EM (R1) BCT EM (R1),5 Branch if 1 GT 2
BLLT @M4(R4) BCT @M;(R).6 Branch if 1 LT 2
BLGE EM (R1) BCF @My(R4)6 Branchif 1 GE2
BLLE EM(R1) BCF @M4(R).5 Branch if 1 LE 2
BLEQ @M4(Ry) BCT @M(Rq),7 Branch if 1 EQ 2
BLNE EM (R1) BCF @Mq(Rq).7 Branch if 1 NE 2
SLGT My or I SCTF 14,5 Skip if 1 GT 2
SCTB 14,5
SLLT My or ly SCTF 14,6 Skipif 1 LT 2
SCTB 14,6
SLGE Mj or I SCFF 14,6 Skip if 1 GE 2
SCFB 14,6
SLLE Mj or Iq SCFF 14,5 Skip if 1 LE 2
SCFB 14,5
SLEQ Mj or ly SCTF 14,7 Skip if 1 EQ 2
SCTB 14,7
SLNE My or I SCFF 14,7 Skip if 1 NE 2
SCFB 14,7
Iq = -15 through +15 for the extended instructions. 17 = 0-15 for the regular instructions.
After Decima! Instructions
BKP @M4(R4) BCT
BKM @Mq(R4) BCT
@M4y(R1),1
@M4(R1),2
Branch if plus
Branch if minus
3-12
After Decimal Instructions (Continued)
Extended Code
BKZ @My(R4)
SKP М, or 14
SKM My or 14
SKZ My or |4
Machine Instruction
BCT @M4(R4),3
SCTF 11,1
SCTB 141
SCTF 14,2
SCTB 14,2
SCTF 14,3
SCTB 14,3
Meaning
Branch if zero
Skip is plus
Skip if minus
Skip if zero
ly =-15 through +15 for the extended instructions. 14 = 0-15 for the regular instructions.
After PAKX Instruction
BID @М (R1)
ВМ! @My(R4)
SID My or l4
SN! M4 or 14
BCT @M4(Rq)4
BCF @M4(R4),4
SCTF 14,4
SCTB 14,4
SCFF 14,4
SCFB 14,4
“Branch if invalid digit
Branch if no invalid digit
Skip if invalid digit
Skip if no invalid digit
14 = -15 through +15 for the extended instructions. 14 = 0-15 for the regular instructions.
After TBIT Instruction
BBS @My(R1)
BBR @My(R1)
SBS M4 or 14
SBR Mor,
BCT @M(R4),0
BCF @M4(R4),0
SCTF 14,0
SCTB 14,0
SCFF 14,0
SCFB 14,0
Branch if bit is set
Branch if bit is reset
Skip if bit is set
Skip if bit is reset
14 = -15 through +15 for the extended instructions. 14 = 0-15 for the regular instructions.
Condition Register Test
SCF Mq,l9 0r 14,19
SCT — M4,I5orl4,l9
SCFF 14,1
SCFB 14,1
SCTF 14,1
5CTB 14,1
Skip if bit spec. by lo is off
Skip if bit spec. by 15 is on
14 =-15 through +15 and | = 0-15 for the extended instructions. 14 and I” = 0-15 for the regular
instructions.
3-13
4. ASSEMBLER INSTRUCTION SOURCE
STATEMENTS — OVERVIEW
Assembler statements are requests to the assembler to perform certain operations during the
assembly. Some statements, such as WDD and BDD, generate data, while others, such as
EQU and SPACE, are effective only at assembly time. A summary of assembler statements
can be found in Appendix E.
Assembler instruction source statements consist of:
Name field (usually optional)
Mnemonic operation code
Operand field (optional for some statements)
Comment field (optional)
An example of an assembler instruction source statement is:
NAME
OPERATION OPERAND
1 2349567 849/10 11 12 13 14 15 16 17/18) 19 20 21 22 23 24 25 26 27 8 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
4 L i
i 1
WDD... Cig ,6). . GENERATE. TR ZEROS .
1. ва. À - _ 6 4. LD a4 _ A. AA ALEM” AE xo A A Lt A
The following is a list of assembler statements with a short explanation for each statement.
Program Sectioning and Linking Statements
- CSECT
ENTRY
EXTRN
COM
Identifies the beginning or continuation of a control section
Identifies relocatable symbols defined in the current program that are
used in another program
Identifies relocatable symbols used in the current program that are
defined in another program
Identifies the beginning or continuation of a common control section
Program Control Statements
ORG
END
PUNCH
Sets the location counter
Ends the assembly
Writes data in a user-defined file
4-1
LTORG Assembles literals in a pool
ICTL Specifies nonstandard input format
ISEQ Checks the lines of code for the correct sequence
ALIGN Sets the current location counter to a storage boundary
Linkage Editor Map Address Directive Statement
SEG Defines load-module segment
Symbol and Data Definition Statements
EQU Defines a symbol and assigns values and attributes to it
WDD Defines word aligned data (in bytes)
BDD Defines byte aligned data (in bytes)
WRS Reserves word aligned storage (in words)
BRS Reserves byte aligned storage (in bytes)
FORM Defines bit-oriented formats (in storage bytes)
Listing Control Statements
TITLE Identifies the listing
EJECT Starts a new page
SPACE Inserts blank lines
PRINT Specifies the details to be printed
Macro Definition Statements
MACRO Begin macro definition
MEXIT Conditional exit from macro definition
MEND End macro definition
MNOTE Macro message
4-2
Conditional Assembly Statements
SETA
SETC
GBLA
GBLC
ADO
AGO
ANOP
Assigns arithmetic values to set symbols
Assigns character values to set symbols
Defines a SETA symbol as global
Defines a SETC symbol as global
Sets up a source statement generation loop
Specifies a branch to another statement
Specifies an assembly no-operation statement
4-3
5. PROGRAM SECTIONING AND LINKING STATEMENTS
The programmer can divide a lengthy or complex program into control sections to make it
more manageable and easier to debug. Each section is assigned a unique name. The operating
system treats each section as an independent, relocatable routine that can be executed alone
or linked with others.
During assembly, the assembler creates an index of all assigned control section names. At
load time, the Linkage Editor uses the index to link the various control sections into a single
storage module, from which the connected sections can be executed as a complete program.
The assembler mnemonics and functions of the program sectioning and linking statements
are:
CSECT Identifies the beginning or continuation of a control section.
ENTRY Identifies relocatable symbols defined in the current program that are used
in another program.
EXTRN Identifies relocatable symbols used in the current program that are defined
in another program. |
COM Identifies the beginning or continuation of a common control section.
(The reserved symbolic segment tag, $SYSEG, is also explained in this section.)
CSECT — IDENTIFY CONTROL SECTION
The CSECT statement identifies the beginning or continuation of a control section. The
format of the CSECT statement is:
Name Operation . | Operand
Symbol or CSECT Not used — ignored by the
blank assembler
If a symbol appears in the name field, it is the name of the control section: otherwise, an
unnamed control section is defined. The symbol in the name field represents the address of
the first byte of the control section. It has a length attribute of 1.
‘To preclude the generation of an unnamed CSECT section; the CSECT statement must
precede all statements except the following: macro and FORM definitions, listing control
statements, conditional assembly statements, ICTL and ISEQ statements, EXTRN and
ENTRY statements, PUNCH statements, and comments.
5-1
If the assembler encounters a statement other than these before a CSECT statement, an -
unnamed CSECT statement is generated.
All statements following the CSECT statement are assembled as part of that control section
until another CSECT or COM statement is encountered. A control section can be
interrupted and then resumed by inserting another CSECT statement with the same name,
as in the following example. Control section ONE includes all code between the first ONE
CSECT card and the TWO CSECT card plus all code following the second ONE CSECT card.
Unnamed control sections can also be resumed.
ONE CSECT
Control section ONE
TWO CSECT
| Control section TWO
ONE CSECT
| Control section ONE
SYMBOLIC LINKAGE STATEMENTS — ENTRY AND EXTRN
The symbolic linkage statements, ENTRY and EXTRN, allow a symbol to be defined in one
program and referred to in another program. The program defining the symbol uses the
ENTRY statement; the program referencing the symbol uses the EXT RN statement. In both
instances, the assembler provides the linkage editor with the information to resolve the
symbolic linkage.
ENTRY — IDENTIFY ENTRY POINT SYMBOL
The ENTRY statement specifies which relocatable symbols defined in the current program
can be accessed by other programs. The format of the ENTRY statement is:
Name Operation Operand
Sequence ENTRY One or more relocatable
symbol symbols separated by comma
or blank
The symbols in the operand field may be used as operands by other programs. Control
sections named in CSECT or COM statements are automatically considered entry points and
do not have to be listed in an ENTRY statement. In the following example, the ENTRY
statement identifies SUB1 and SUB2 as entry points to the program:
5-2
NAME OPERATION OPERAND
1,234 5 6 7 819010 11 1213 14 15 16 17/18) 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
EN TRY. 1. À SUBI 1 3 SUBA Ad Did Aa da ALE A Ama o en 0 dd Aaa A de
4 - . dd 4 * a Lo. A a a a + L L Ae
a» FE e a A a - 1 a . . a 1. a i aaa 1
EXTRN — IDENTIFY EXTERNAL SYMBOL
The EXTRN statement identifies relocatable symbols that can be used in the current
program, although they are defined elsewhere. The format of the EXTRN statement is:
Name Operation Operand
Sequence EXTRN | One or more relocatable
symbol symbols separated by commas
or blank
Symbols named in the operand field cannot appear in an ENTRY statement in the same
program. The combined total of control section and external symbols in the same program
cannot exceed 252.
The example in Figure 5-1 shows how two programs, PROGA and PROGB, use EXTRN and
ENTRY, so PROGA can use symbols defined in PROGB. EXTRN in PROGA identifies
FETCH as a symbolic address that is defined in another program. ENTRY in PROGB
defines FETCH as an entry point in PROGB. Thus PROGA can use FETCH as an operand
without first defining it.
NAME OPERATION OPERAND
12 3,4 667 8/9/10 11 12 13 14 15 16 17/18/19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
d. è L 2 L = i de i de e 4 A i d 4 à L L L i de, de + + Л d 4 + dos + ds ake da
PROGA ... wo СО ЕСТ Ad + LL 4 1 Ве a BRA Aaa E La de ALA AA a e A L L i Eo -.4 L + 4 L 1
| EXTRN FETCH
pu LL... 15% 4 KA a à “eR... a rr A Ann а бокс ана а dm LL
—e
hd ALA а во аа О & A RL 4 #..--+…. + 4 » 1 4 x 1 д À 1 1 1 1 1 i 1 + 1 i Aer. x dah)
%
Ба аа ce dc 14 2 Les A ae A Aa ...… A Liz. de Elo ad A, а Loa. A Aa 1 i 1 1 1 i 1 AAA L L 4 4 L 1 4 |.
®
ааа Loa e 25 a a я а BL. 42212004 1 Sob на кн на ааа ан A LA AA AAA,
А i 4 x er ok B A oa ae A oa FE: Г CH a Ea ACA AA AA ALA AAA A AA A dd heen Lo
v
Re de A Aa de a a mn A A SAA e A A AAA dd A А нана ааа ав на ан
e
ha dea e A A a EA AE Ed Aa AA AA AAA add. LE Ada do e de Aa Ad AA а
L J
ан 2e E em m nk E E ARR AA 4 . La та Aaa ав ааа dea AAA са AL
pu a a den _END - 1 Li 4 4 1 A 4 _ L_ Li dea dad AAA A AL
SA AA ads PU 1 — + 4 L +. — ао A + L An nd
OGB. CSECT 4 A AA =... da : L a bo. Amo ed а 1 L L.. 4 4 Li did. ALE... A. A. 1 >
Ana da A AA, N Г КУ . Ben nn FETCH - 1 + + A Ad AA à + 1
. .
ba .. Я 1 L . + В 4 IL... - - 1 a A a 4 LL... A Ad Add. LA
.
E LL A — I aa а 4 4 i L 1 L a ad AAA Aa
e
а аа ‘ Loa lada da AAA AA 4 L a =
FET E B ... a. I AGE, R 1, i L 1 i de do de Med A AA
.
4 i i 1 1 Sack A 1 L L L t i 4 1
.
i 1 KL LL a 4. ша 4 1 a 1 A
®
L i я 1 L i 1 1 1. A 1 Й A. 5 Aa 4 N у Аааа E 1 1 L 1 1 1 1 Л i 1 1 + FE A dbl LL
rd AA A LA END. 4 x i а. L UT Da CS 0e A o 1 L 1 1 he An A 4 4 4 4 i. 1 + + A + a.
Figure 5-1. Example of EXTRN and ENTRY
5-3
COM — DEFINE COMMON CONTROL SECTION
The COM statement identifies the beginning or continuation of a common control section.
The format of the COM statement is:
Name Operation Operand
Symbo! COM Not used — ignored by
or blank the assembler
If a symbol appears in the name field, it is the name of the common storage area; otherwise,
an unnamed common storage area is defined. An unnamed COM control section does not
have the same name as an unnamed CSECT section. If two COM statements with the same
name appear in the same program, the second is a continuation of the first. When COM
statements are assembled, the common location assignment starts at zero. The symbol in the
name field represents the address of the first byte of the control section. It has a length
attribute of 1. |
Since a COM control section's primary function is to define the structure of a storage area
used by more than one program, no binary data can be generated by statements within the
COM section. However, pertinent storage information such as address assignment,
relocatability, and length attributes are retained and assembled in the normal way, without
binary output.
Data can be stored in a common storage area during assembly only by a CSECT control
section in a different assembly, in which case the CSECT control section must use the same
name as the common area defined and reserved by COM statements. After the programs are
assembled and the Linkage Editor has performed the necessary linkage, data can be
retrieved, stored, checked, and manipulated in the common area by any cognizant program
currently being executed.
No more than one CSECT control section may be included in a set of COM control sections
identified by the same name in the same load module.
The example in Figure 5-2 shows how two programs communicate information through the
common area. Each program must know the other's plan for structuring and using the
common storage area. If program PROGA is to pass information to PROGB, PROGB must
know the location in COMMON to which PROGA will pass the data. In this example,
information is passed through COMMON at location TAGE. In PROGA, the statement STO
TAG5,R2 stores the contents of register 2 at location TAG5. After the branch is made to
FETCH, PROGB loads the contents from TAGE (which is the same location as TAG5 in
PROGA) into its register and checks to see if it is equal to the hexadecimal constant: ‘AF’.
If a true comparison is found, a branch is made to PROGC. Note that when the Linkage
Editor is called to link the programs at load time, each program is linked to COMMON.
5-4
NAME
OPERATION
OPERAND
1234567 8] 9
10 11 12 13 14 15 16 17
18| 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50°
TAGZ,RI
15
1 i
3 3) 4
RE ad
1 + ee 1 4 1 4
"EF" 0,2)
PROGA . . CSEC Г. 4. . на кю на са анод de bla Gs ded LL aoa a L . as +.
E A O | EN ] R y аа №0 66. A | BO La a Aa -…. i A i
Lona ee me aa 1 a, | EXT RN 3 нае ~ F ET ‘CH A AA nad La Ade A A Le AA a i. . a a 4 = 224 1 422 eu
. . . ;
| — - i Lo. de LA a a FE A AA AA Le b- dad AL +... . 14. À E 0 4 я. - 1 a 1 . “21 u,
8 - .
а Lb doo. a... A FU a E Mud A A 4... a Ea. Aa Le Lo. oa... hb Ca 2122 2... a 1 24. me 4 24 2 a. 1 dd. 1-1 2 À
LOD .… - TAG. | ‘} Rl. «44 4. À A 1 1 Le. 4. A
1 a An 3 _ 1 4 и mn. E e = 1 a Kona -. …. 0 а a a . Ca - A a 1
x L ] AG i { 4 Г / 165 4 Lo Me. 1 a EA .. а e. À oa 1 . i , daa L
1 1 i 1
1 1 1 i 1
1 КО 0 1
1 1 1 1 1
L. д аа. À
1 4 +
E i 1 i
11 à 310 i 1
1 а... 1
À 1 4
L 1 L 1 1
14
re el dd. be do ad A dd ln 4
NAME
OPERATION
OPERAND
[1234567 89
10 11 12 13 14 15 16 17
18
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
bt
PROGB =
Y . | [FETCH ....
PROGC . .
ENTRY |
AAA AL Ea AL. A
| [TAG
'
E RI.
=x" AREY
LA de AAA AA mn
| RL...
| PRosc *....
4 A L…. 4.0 Lo. k a 1 FI L
1 4 4-40 da A A 1
4 a + — A
1 i L i L LoL... Lb
1 Ld. i 4 Lo...)
1 1 4 i LL
A A — 1 A
L. а. md L
1 1 1 4 1 1 L
ай аа de MA ad —. н.а L
L JR L 4
A -L 4e A A ‘ A.
i _ -—d [
a E be A. LL i L
+ Ё — вн — A... LL L — dk. 1
l 0 de na i Ada A. Ld i + 1 ana
A. 4 An „uk 1 1 L 1
+ _ nd. LP A0 À E E A FER a es i
A. + + Lo AA... 1
pra | же BA A ed A — + 1 AA
Figure 5-2. Example of the COM Statement
5-5
RESERVED SYMBOLIC SEGMENT NAME — $SYSEG
The reserved symbolic segment name, $SYSEG, is a relocatable segment designator which
makes extended addressing possible. A reserved name has a special meaning to the system
and should not be used as a symbol for any purpose other than its special meaning.
Symbolic segment tags are used for address referencing across program (or storage)
segments. However, a user whose program is limited to one segment need not use segment
tags. To make all system interfaces (1/0 requests and service requests) compatible, addresses
specified in these interfaces must have an associated segment tag.
When a single-segment program is written, the assembler assigns the global system name,
$SYSEG, to the first (and only) segment in the program. $SYSEG is automatically entered
in the symbol table by the assembler, and thus becomes a reserved identifier.
The name $SYSEG is used as a default value in all system macros containing address
parameters. The user must concern himself with $SYSEG only if he is coding system
interfaces directly without using the regular system macros.
$SYSEG cannot be used in a multi-term expression. It can only be used as an operand in a
BDD, WDD, or FORM instruction. If it is used in a FORM instruction, the size of the
corresponding definition field must be 8 bits in length and start on a byte boundary. The
length attribute of $SYSEG is 1.
5-6
6. PROGRAM CONTROL STATEMENTS
The assembler mnemonics and functions of the program control statements are:
ORG
END
PUNCH
LTORG
ICTL
ISEQ
ALIGN
Sets the location counter
Ends the assembly
counter.
Writes data in a user-defined sequential disk file.
Inserts the accumulated literal pocl, starting at the current location
Specifies nonstandard input format.
Checks the lines of code for the correct sequence.
Sets the current location counter to a storage boundary address.
ORG — SET LOCATION COUNTER
The ORG statement alters the setting of the location counter. The format of the ORG
statement is:
Name Operation Operand
Sequence ORG Relocatable expression or
symbol blank
or blank
Symbols in the expression must be 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, or to its previous high
count, if the operand field is blank.
Since the location counter points to a storage location that is to receive the next line of
assembled code, altering its setting permits a programmer to return to a previous location in
his program and change its contents. In this way, an area can be redefined during assembly,
changing data definitions to meet various requirements in the program.
An example of an ORG statement is:
NAME
OPERATION
OPERAND
1234567 8/9
10 11 12 13 14 16 16 17
18
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50,
+
«FIRST
| ORG. LA... Ad
. 4. a . . E a
1 AG Sal ee oo Lh Lola a. a Aa ea a hdl mb Lk AA a DA AA AA
|--- | A а. A. + 1
L + a a A a dede de DB de AA AA E 4 а . 1 „nd
6-1
If the location named TAG is twelve bytes from the beginning of the control section, this
statement sets the location counter to 000C. Statements that follow the ORG statement are
then assembled beginning at address 000C. The information previously assembled at these
locations is lost, although the name tags remain unchanged and cannot be duplicated.
The ORG statement can also be used in direct reference to the location counter. The format
of the operand is *-n or *+n. The asterisk specifies the present location counter, and n
specifies the number of bytes. The following statement decreases the present location
counter by 60:
NAME OPERATION OPERAND
12 34 5 6 7 8/9/10 11 1213 14 15 16 17| 18) 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40,41 42 43 44 45 46 47 48 49 50,
+ SECD. a a ORG . a L a xo 60 4 + Roa À + 1 1 * 4 a 4 1
a L 1 1 1 1 а . 1. 4 a i a 1 1 a . 1 1 ‘ a . A . - a a.ù
An ORG statement without an operand returns the location counter to its previous high
count, as in the following statement. If the counter has already reached its previous high, an
ORG without an operand has no effect.
NAME OPERATION OPERAND
17 3 4 5 6 7 89] 10 11 1213 14 15 16 1718) 19 20 21 2223 24 75 26 27 28 29 30 31 32 33 34 36 36 37 3899 40 41 42 4314 45 46 47 48 49 50,
. THRD. AA Q ORO 1 a 1 a a Ea 3 а a. + a A. Ad 4 Ao i . 7 4 [ 1 a L [a 4 A a 1 Ad. J a ko. РО E
+
The following example shows an ORG with a location counter reference and an ORG
without an operand. If the location counter is 0050 when ORG *-20 is encountered, the
count is decreased by 20 bytes to 003C. Then if the ORG without an operand is
encountered before the counter reaches its previous high of 0050, the count is returned to
0050. |
-
NAME OPERATION OPERAND
1234567 8|9|10 11 1213 14 15 16 17 19 19 20, 21 22 23 24 25 26 27 78 29 3) 31 32 33 34,35 36 37 3839 40 41 42 43 44 45 46 47 48 49 50,
»
Lo. Lo. i а « ..k La LL. bee Ad 1 i 1 a A а de. " 4 1. a аа 1 - д a. E
>
. : L 1 Lo... 4. к Г 1 Г 4 1 i 1 1. - 1 1 ПИ 1 . + ’ 1 a. а 1
e
1 1 В . 1 1 2 | ‘ L . 1 Я 1 ‘ Lo. a 10 ad a 1 “ ı À i ‘ A я 1 Г . в ab à 1 ad.
ORG. ‘ a a a *- 2.0 а a 1 4 1 a a i 1 : а 1 —dA A 1 a a. À 1 a. a а 1 [O A a .L
.
. i i . N 1 a : . + 1 В i i О i 1 ‘ 1 в lo A 1 à 1 L 1 1 Poo 1 В AA a. L
.
a - E E 1 1 1 1
.
A E. « а . 1 1 1 i 1 +
| ORG. 1 1 i E 1 1 4 1 | 1 E" 1
1 1 1 i 1 1 i 1 1 1
For an example of an application of the ORG statement, refer to Figure 8-3 in Chapter 8.
6-2
END — END ASSEMBLY
The END statement terminates the assembly of a program. The format of the END
statement is: |
Мате Operation Operand
Blank END Ordinary symbol or blank
An ordinary symbol in the operand field specifies the point to which control is to be
transferred when loading is complete. The ordinary symbol must identify a symbolic address
in the current assembly. Substitution is invalid on the END statement. Continuation is
ignored on the END statement. |
PUNCH — WRITE TO FILE
The PUNCH statement writes data in a user-defined sequential disk file. The format of the
PUNCH statement is: |
Name Operation Operand
Seguence PUNCH | Not used
sy mbol
or blank
The PUNCH statement precedes the line of code that is to be written in the file. The line of
code can be in any format and it cannot be continued. In the following example, //DEF
ID=INPUT,FIL=CAT is written in a file defined by the user:
NAME OPERATION OPERAND
12344567 8/9/10 11 1213 14 15 16 17) 18119 20 21 22 23 24 25 26 27.28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
x > + . send PUNCH dou __E A. 4 Ad a 1 —k на , “ + bee aude A Aa dde de A 4 = da 4. - « + 1
- О
/ /DEF. - 1D - INPUT J) FIL =CAT 1.1 ç x 1 - . A Lo i a i 4 1 A а д. a 4. 4 a i - i a 1
DO 1 aa a - + . 1 . |н- 1 ГЕ + : a a Eo Aa - ... ^ » ..L - a deL Ad A + 1. 1 - + . L - I . Cd
Variable symbols in the line of code are resolved before the record is written to the file. If
substitution results in a record that exceeds the standard statement size (columns 1 through
72) or nonstandard size specified by an |ICTL statement, excess characters are truncated on
the right. |
The PUNCH statement does not lend itself to a fixed field format, because as values of
various lengths are substituted for a variable symbol, the position of the subsequent fields is
shifted.
In the following example, values are substituted for the variable symbols $TAG and $VAL
before the record is written.
6-3
NAME OPERATION OPERAND
172345006738 3 | 10 11 12 13 14 15 16 17} 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50.
ede se
. ‚ a . a a a. | UNCH . 1 à 1 1 Aa a 4 da AO AAA. A e a AL 4 X AOL A a. A La a а - A dd de de
AME а IS. ; T AG са МА , - A LS. EV AL „Ass ud A 4 1 a | O 1 i 4 1 а. 1
1 a + and 1 a ‘ k . - + + 4 da A Ae LA + a Loa 3 1 , k
PP AA
If STAG is equal to AB and $VAL is equal to 75, the record written in the file is: NAME IS
AB VALUE IS 75.
If $TAG is equal to C'THIS IS A MESSAGE’ and $VAL is equal to 10, the record written in
the file is: NAME IS C'THIS IS A MESSAGE" VALUE IS 10.
Notice that the statement VALUE IS. . .is moved to the right to make room for the first
statement NAME IS... .
A fixed field format may be established by using a variable symbol with as many characters
(including the ampersand) as the substituted value.
LTORG — BEGIN LITERAL POOL
The LTORG statement assembles previously defined literals into a single area called a literal
pool. All preceding literals, back to the beginning of the program, or back to the last
LTORG statement, are assembled at the next word boundary. If a LTORG statement is not .
used, all literals are assembled after the first control section. Literals that appear after the
last LTORG statement are also assembled after the first control section.
The format of the LTORG statement is:
Name Operation Operand
Symbol LTORG Not used
or blank
A symbol in the name field represents the address of the first byte of the literal pool. The
length attribute of the symbol is 1.
ICTL — INPUT FORMAT CONTROL
The ICTL statement specifies that statements in a program begin and end in columns other
than the standard columns 1 and 72. The format of the ICTL statement is:
Name Operation Operand
Not used ICTL Two decimal arithmetic
constants separated by
a comia
6-4
Both decimal constants are required. The first constant specifies the beginning column
(1-40). The second specifies the end column (41-120). A comma must separate the two
constants.
If the source program does not contain an ICTL statement, the standard format (columns 1
and 72) is used. Because system macros are always processed in the standard format, they
are not affected by the ICTL statement.
Since the ICTL statement establishes a new format, it must be the first statement in the
program and can be used only once. The ICTL statement cannot be continued.
The following statement establishes column 10 as the begin column and column 90 as the
end column.
NAME OPERATION OPERAND
1 23485067 8/94 1011 1213 14 15 16 17/18/19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 4344 45 46 47 48 49 50,
m Ar AA ern aa a ICTL 1 1 4 es 10 КГ A La 224 2 Ke ee Len 1e ee de 1 AL A i 1, L 1. A 1 L- 4 AA A Led A L +
a A — E. add... A AA AA A а 1 AA ан! | a 1%. L 1
ISEQ — INPUT SEQUENCE CHECKING
The ISEQ statement specifies that all subsequent statements are to be checked or not
checked for correct sequence. The format of the ISEQ statement is:
Name Operation Operand
Blank ISEQ Blank, or two decimal arithmetic
constants, separated by a comma
If the operand field is used, both decimal constants must be specified. The first constant
specifies the column number of the leftmost character of the sequence field; the second
constant specifies the column number of the rightmost character of the sequence field. A
comma must separate the two operands.
Sequence checking begins with the first line following the ISEQ statement and continues up
to an ISEQ statement without an operand. Checking can be resumed with another ISEQ
statement. If each succeeding sequence field is not higher in value than that of the preceding
statement, a sequence error message is generated. A sequence error does not terminate the
assembly.
The columns identified by the ISEQ statement must be between columns 73-80 if the
standard begin and end columns are used, or outside the begin and end columns defined by
an ICTL statement.
6-b
Sequence checking is only performed on statements contained in the source program. Macro
definitions in a macro library or lines generated by a macro instruction are not checked.
Lines with a blank sequence field are always considered to be in the correct order.
The operand field of an ISEQ statement may not contain a reference to a variable symbol.
The ISEQ statement cannot be continued.
ALIGN — ALIGN LOCATION COUNTER
The ALIGN statement sets the value of the location counter to an address determined by a
value in the operand field; the assembler updates the counter to the next highest address
which is a multiple of the expressed value in the operand. The format of the ALIGN
statement is:
Name Operation Operand
Symbol ALIGN Absolute
or blank arithmetic expression
The operand can be an expression to be evaluated by the assembler; however, all symbols
must be previously defined.
In the following example, the location counter is set to the next highest multiple of 4
addresses. If the location counter is at 1009 when the statement is encountered, it is set to
100C. However, if the location counter is already set to an address which is a multiple of the
operand value (1008, 100C, 1010, etc.), the counter is not changed. After alignment, the
address of the location counter is assigned the symbolic name in the name field. In the
example, FOUR1 is equal to 100C. The length attribute is always 1.
NAME OPERATION OPERAND
1 2 3 4 5 6 7 8/9[10 11 1213 14 15 16 17/18/19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50,
F OUR | ALIGN я. a 4. + 1 + . * 1. 4. de. dd 2004 LA Ad A . L . . я я A dE
b- - - - . 7 a |. - a a a 4. - -- + a + a . - 4 . 4 + L Ad Ad 4 1 1 - - - + L a.
HL
If the counter is set to an address exceeding 65,53510, an error message is generated and
alignment occurs. The location counter is set to the value exceeding 65,53510. An address
of 65,60010 will set the location counter to 6410. |
7. LINKAGE-EDITOR MAP DIRECTIVE — SEG
The Linkage Editor map directive, SEG, may be used as an assembly language statement.
The assembler does not process the statement, but simply writes the directives, in their
source form, on the output file. |
All SEG statements in an assembly must immediately precede the END statement. The only
statements that can appear between the SEG statement and the END statement are the
conditional assembly statements SETA, SETC, ADO, AGO, ANOP, and macro instructions
generating these statements. A SEG statement cannot be continued and no substitution is
performed. ВЕ
The function and format of the SEG statement is described in the publication MRX/OS
Program Library Services Reference.
7-1
8. SYMBOL AND DATA DEFINITION STATEMENTS
The assembler mnemonics and functions of the symbol and data definition statements are:
EQU Defines a symbol and assigns values and attributes to it.
WDD Defines word-aligned data (in bytes).
BDD Defines byte-aligned data (in bytes).
WRS Reserves word-aligned storage (in words).
BRS Reserves byte-aligned storage (in bytes).
FORM Defines bit-oriented data formats (in storage bytes).
EQU — EQUATE
The EQU statement assigns values and attributes to a symbol. The format of the EQU
statement is: |
Name Operation Operand
Ordinary EQU Expression
or variable |
symbol
The expression in the operand field can be absolute or relocatable; however, al! symbols in
the expression must be previously defined.
The symbol in the name field is given the same length, value, and relocatability attributes as
the expression in the operand field. The length attribute of the symbol is that of the
leftmost (or only) term of the expression. When that term is a location counter reference (*)
or an arithmetic constant, the length attribute is 1. The value attribute of the symbol is the
value of the expression. When the newly defined symbol is referenced in later statements, it
has all the attributes assigned by the EQU statement.
The EQU statement can equate symbols to register numbers, immediate data or other
arbitrary values, as shown in the first two examples of Figure 8-1.
The EQU statement can also equate symbols to frequently used or complex expressions, so
that the programmer can use the symbol rather than an entire expression, as shown in the
last two examples of Figure 8-1. Note that all symbols in the expression must be previously
defined.
8-1
NAME OPERATION OPERAND
12 34 6 6 7 8{9]10 111213 14 15 16 1718] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 4344 45 46 47 48 49 50,
ES TEQU IV. a ana
REGISTER NUMBER! |. a
56 .. |EQU . |IC'INCORRECT LABEL' . e o
IMMEDIATE DATA:CHARACTER CONSTANT. a
FREQ . маки)
CONF . (C3+B)/7%M)+85-NAM o ВЕ |
ааа Аааа
Figure 8-1. Examples of EQU Statements
WDD AND BDD — WORD AND BYTE DEFINED DATA
The WDD and BDD statements define aligned data in storage. The WDD statement aligns the
data constant defined in the operand at word boundaries; the BDD statement aligns data at
byte boundaries. Both statements have the same basic format:
Name Operation Cperand
Any symbol WDD or BDD One or more operands
or blank separated by commas
The name field reflects the address after alignment.
Operands must be separated by commas and have the format:
a Where:
a(b,c) a A data value to be generated (required); any valid ex-
pression. If the data value is a forward symbolic refer-
a(b) ence, and no explicit size is coded, it is assumed to be
a two-byte value.
a(,c) ‘
b = A length specification (in bytes); a positive predefined
absolute expression. If omitted, the length specification
is the implied size of the expression. If the explicit size
of a forward symbolic reference is one byte, and if the
symbol resolves to an arithmetic or string of more than
one byte, a warning diagnostic is issued.
Cc = A repetition factor; a positive predefined absolute ex-
pression. If omitted, a repetition of one is assumed.
Locations Contents
OOFC xx xx xx indicates that the contents are
OOFE 00 00 residual data
0100 00 00
0102 00 00
010C 00 00
TAG, then is equal to OOFE. However, if TAG BDD 0(4,2), 0(4,2) is specified rather than
TAG WDD 0(4,2),0(4,2) and the location counter points to O0FD, the first zero byte is
stored at address OOF D and the last byte at address 010C. TAG is equal to OOFD.
/ |
If multiple operands are specified, each operand is word-aligned for the WDD statement, or
byte-aligned for the BDD statement, as in the example:
Statement Generated Data
WDD ТАС1,Х’13',Х'05',ТАС2 TAG1 Word 1
13 xx Word2
05 xx Word 3
TAG? Word 4
Where:
TAG1 = atwo-byte relocatable tag
XX = contents are residual data
TAG2 = atwo-byte relocatable tag
WRS AND BRS — WORD AND BYTE RESERVE STORAGE
The WRS and BRS statements reserve storage without preset data. The format of the WRS
and BRS statement is:
Name Operation Operand
Any symbol WRS or BRS Absolute
or blank arithmetic expression
The symbol in the name field is the address of the first byte, and has the length attribute
(number of bytes) of the storage area.
8-b
The operand of the WRS statement specifies the number of words to reserve; the operand of
the BRS statement specifies the number of bytes. Symbols used in the operand field must
be previously defined, and when evaluated must equal a positive, absolute arithmetic value.
If the operand is zero, the location counter is aligned on the specified word or byte
boundary.
In the following example, WRS and BRS each reserve 800 bytes of storage. The first byte of
the WBUFF area begins on a word boundary, while no distinction between odd or even
address bytes is made for BBUFF.
NAME OPERATION OPERAND
1 2 3 4 5 6 7 8/9|10 11 1213 14 15 16 17) 18/19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 4344 45 46 47 48 49 50°
|
UFF. - - BRS | 808 d aa a 1 ' de. oo. 1 a 4 a 1 a L a L 1 a 1 ra а a. я 4 a ae Damm L
р-н Lo a a EA Aa a . Loa 1 а a a a 1 de AA A. A... AA] 1 1 1 У 1. а i ‘ do 4.2 11 24 0 4
BUFF. À 4 WRS. > A a |. 6.0 L a 1 4 ' a donna LA +. 1 Colo 1 4 1 4 i 1 Lo. +. LA a Aa AAA 1
#4 10° 2° 4° 2100 211 21 Lr a 1 1 a 1 L
1 E L 4 4 1 te 1 1 e 1
In Figure 8-3 the example shows the use of an ORG statement in conjunction with WDD
and BRS. After the second ORG statement, the value of TAG1(29,1) is: CONTENTS OF
ABCD ARE INVALID.
NAME OPERATION OPERAND
12 3 4 5 6 7 819110 11 1213 14 15 16 17/18/19 20 21 22 23 24 25 26 27 28 29 20 31 32 33 34 35 36 37 38 33 40 41 42 43 44 45 46 47 48 49 50
rima tom
TAG! | WDD... | |c' CONTENTS OF". aaa aaa
TAGA . BRS . |. aaa
TAG3 . | WDD... | [C*'ARE INVALID. aaa
‚1, ORG. ..IITAGZ... RETURNS CTR TO TAG2.....
УМЫ» . | C'ABCD'. INSERTS CHAR*S. ÂT TAGL.
ORG... |] 1121 CTR SET. TO PREVIOUS HIGH
END | | | |
Figure 8-3. Example of an ORG Statement with WDD and BRS
8-6
FORM — DEFINE DATA FORMAT
The FORM definition statement defines a symbolic name to be used as a mnemonic in the
operation field of a subsequent statement, and specifies the size (in bits) and storage
alignment of each operand to be used with the mnemonic. The format of the FORM
definition statement is:
Name Operation | Орегапа
Ordinary FORM One or more positive arithmetic
symbol expressions separated by commas
The name field which is required, defines the mnemonic operation code for a FORM
instruction statement. Expressions in the operand field must equal a number between 1 and
255. Symbols in the operand field must be previously defined.
The FORM definition statement in the following example defines a mnemonic, STAR, and
specifies that its first operand is assigned four bit positions; the second, four also; and the
third, eight bit positions.
NAME OPERATION OPERAND
1.234 5 6 7 8910 11 1213 14 15 16 17/18/19 20 21 22 23 24 26 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50.
Al bh treated nn 8
SI AR AMA . I ORM - x Я 14,4 +] 3 A hl aoa ka. ESE Aa A 1 4. A al MAA 1 i y La 2 1 L
4 a 4 Fa. + i 1 a a я A 4 4 a 1 1 1 + 1 а а : x i 1 4 1 " 1 i a
FORM — INSTRUCTION STATEMENT
The FORM instruction statement specifies the data to be generated according to the format
defined by the corresponding FORM definition statement. The format of the FORM
instruction statement is:
Name Operation Operand
Any symbol FORM name Exp,exp,. . .,exp
or blank
The FORM name in the operation field must be previously defined in a FORM definition
statement.
The operand field may contain any valid expressions, separated by commas. No alignment is
performed before data generation. The values specified in the operand field of the FORM
instruction are matched by position to the fields defined in the operand of the
corresponding FORM definition statement.
Missing operands (signified by contiguous commas) are replaced with zeros. If the number
of operands in the instruction does not match the number specified in the definition, an
error message is generated.
If the symbol in the name field of a FORM definition is a mnemonic used in more than one
type of instruction, the assembler assigns attributes to the instruction according to the
following hierarchy:
1. Machine and assembler instructions.
2. User macros and user FORM instructions within user macros.
3. User FORM instructions outside macros.
4. System macros and FORM instructions within system macros.
For example, if the programmer codes the following statements, the assembler treats the
statement &A EQU A as an assembly language statement (1. above) rather than a FORM
instruction.
NAME OPERATION OPERAND
12 34 5 6 7 8[9[10 11 12.13 14 15 16 17/18) 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
EQU a a + à. ORM 1 X . 3, 4 4 1 1 A 1.4. 42 A MA 0 a i 1 A a +. 1 10€ A a + , а 1 i.. A
A dE x Po . a . a a 1 , 1 + a da A A A a . 4 4 1 а i . a а 1 - - a. |
If the value of an expression is relocatable and not $SYSEG, the following conditions must
be met; or a relocation error occurs and the expression is made absolute:
1. The size of the corresponding FORM definition field must be 16 bits
in length.
2. The field must begin on a word boundary.
If the operands of a FORM instruction statement do not use a complete byte, the remainder
of the byte is unchanged. For example, the FORM definition statement, SIGN FORM 1,5,3
specifies that 9 bit positions are required for the operands. When a FORM instruction, such
as .A1 SIGN A< EQ >B,"B,0 calls this definition, the assembler uses two full bytes, but the
last 7 bit positions of the second byte are zeros.
If SSYSEG is used as an operand in a FORM instruction, the size of the corresponding
FORM definition field must be 8 bits and start on a byte boundary.
PADDING AND TRUNCATION RULES FOR FORM STATEMENTS
Padding and truncation is done according to the following rules:
1. Hexadecimal values are right-justified with zero fill on the left. If the
actual data is larger than the defined field, the data is truncated on
the left.
2. Alphanumeric character constants are left-justified with blank fill on
the right. If the actual data is larger than the defined field, the data IS
truncated on the right.
3. Packed decimal values are right-justified with zero fill on the left. If
the actual data is larger than the defined field, the data is truncated
on the left.
4. Zoned decimal values are right-justified with zero fill on the left. If
the actual data is larger than the defined field, the data is truncated
on the left.
D. Integer string values and arithmetic values are right- justified with the
sign propagated on the left. If the actual data is larger than the
defined field, the data is truncated on the left and the sign is lost.
The examples in Figure 8-4 illustrate certain padding and truncation rules. The first operand
of TAB1, a hexadecimal 5 (0101), is truncated on the left and the two rightmost bits (01)
are inserted in the 2-bit field defined by 2 in the FORM definition statement. If the value
attribute of B in the second operand is less than C, the single bit position established in the
corresponding definition statement is set to a binary 1. If B is greater than C, the bit is set to
a binary O.
The first A character constant (1100 0001 in EBCDIC) in the second TABLE statement is
truncated on the right, and the remaining two leftmost bits (11) are assigned to location
TAB2. Note, however, that all eight bits (1100 0001) of the second A character constant in
the fourth operand position are retained at location TAB2+1.
NAME OPERATION OPERAND
1234667 8/9|10 11 1213 14 15 16 17/18/19 20 21 22 23 24 25 26 27 28 = 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
LL ана
TABLE | [FORM I 5,8,16
TABI . | TABLE. | y Весть, fe, Fd, ADDR, BYTE
TAB2 | TABLE |. qe a, ra cra’ |
Figure 8-4. Examples of Padding and Truncation for Form Statements
The following examples show a possible use of the FORM statement — redefining
instructions to create a new language closer to English. In the first example, the “MOVE”
instruction generates a MOVM machine instruction, using a FORM statement and a series of
Equates. This corresponds to: MOVM BUFFERB(R2),@BUFFERA(R3). Assuming that
BUFFERA is at address 63F A, the code generated is:
602B
63FA
63FC
8-9
NAME OPERATION OPERAND
1234567 e|sf10 11 1213 14 15 16 17/18/19 20 21 22 23 24 25 26 27 28 29 30,31 32,33 34 35 36 37 3839 40,41 42 43 44 45,46 47 48 99 50,
- С. Г EQU. : a л к В AO O 114 de Ad A A 1 1 4 1 L 1 À i 1 1 + 1 L 1 L 4 i À + д 1 i si
IRECT EQU я а «__ L… | oa а 1 41 240 A AA Loot Meh do AL L A L : 5 Л Л iad а Loa ab
EQU ja. a aaa
IEMORY | Equ... | X'.68'.. a a aan
VE |FORM . | 8,1,3,l, 3, 16, LL Le
UWFFERA | WDD. . . С! NOD a aa aaa
UFFERB | WDD..... | C'.56'.. ;
OVE . . | MEMORY DIRECT ne / INDIRECT, R3, 5.
dd dd A ¿A ан Ad A
— | BUEFERB, BUFFERA
| A AA AA x a 4 1 1 AE AL AA dd e LATA A A Ade AA
The next example shows a BRANCH FORM statement used alone to generate a BR machine
instruction, or together with ROUTINE to generate a BSR machine instruction. Assuming
that SUBROUT1 is at 2F3A, the code generated is:
EA07
2F3A
The last statement of this example, BRANCH REGISTER,R7, generates the code: EBO7.
NAME OPERATION OPERAND
10 11 12 13 14 15 16 17/18/19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50,
hab dda
"EA
+ + EQU. - Y. + a E a a a A i 1 i 4 A. A 1 1 i i a 1 4 1 i À + L A 1 1 +
L - - EQU 5 7 a я Ae AAA dd de AA A 4 1 L 1 1 : A 1 hand ны 1 1 L x rob
1 1
a. RANCH | REGISTER, R7 . e .is...
A detailed example of the FORM instruction can be found in Appendix F.
If the length specification or the repetition factor is zero, no data is generated, but the
location counter is aligned on the specified word or byte boundary.
Examples of WDD and BDD statements are shown in Figure 8-2. In the last example, if M =
N, the term 35 is generated. If M = N, no data is generated, but the location counter is set
on a word address, which is given the name NAM4.
NAME OPERATION . OPERAND
12348667 8/9]10 11 1213 19 15 16 17/18) 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50,
М... | МЮ» ... IC" VALUE IS‘C(8) 1... .
2.414 4° 1 LL 1 1 à 1 4 1 1 4 1 1 - a . A a . 1 a I
Aa a a a E da RS
12 =X.' -24B"
3 неа x +P за ааа 1 A
de Aa A A —| а a BA - я ' a 1 1 1 a. 1 . a + 1 PEE L. ' honda A . . i . 4 В . 1
AMS. de 1 1 , 1 4 7 С, 2 B + | 1 ), 3. .1 i ‘ 1 . : 1 1 i 4 J . 1 1 . . Loa {2.144 + À
be hem A oR 1 1 a > 4 1 а. 1 1 i а. à e 4 4 к. а 1 a a. A L 1 : в - Boa « i x 1
Ц >,
A... . 35 (2 4 M<EQ LF . i 1
un -- - i L nod 1 1 [Y 1 1. 1 Bula 1 а 1 1 4 4 а 1. a 1 . 1 1 1 . ‘ 1.
Figure 8-2. Examples of WDD and BDD Statements
The value attribute of the symbol in the name field is the address of the leftmost byte after
alignment. The length attribute is the length in bytes (specified or implied) of the first (or
only) data field in the operand. a
Omitted operands, signified by a comma without a data value, indicate a zero byte or word.
The last data value In a string of multiple operands must be a specified data value, not an
omitted operand.
Consider the following example. Notice that an arithmetic constant, such as 45, uses two
bytes.
Statement Generated Data
WDD ,12,, 45 00 00 Word 1
00. OC- Word 2
00 00. Word3
00 00 Word4
00 2D Word5
If the data value is a relocatable expression other than $SY SEG, the length specification and
the repetition factor have the following restrictions:
1. ~The length attribute must be resolved to two bytes. If the length is
not specified, two bytes are assumed.
2. Alignment must be on a word boundary.
For $SYSEG, the length attribute is 1 and alignment must be on an odd boundary.
8-3
Literals (which are always relocatable} in a WDD or BDD statement require special
consideration. If a literal term is used in the WDD or BDD statement, the implied length and
repetition attributes are (2,1). If other specifications are included, they refer to the literal
term itself, but not to the symbol defined in the name field. Consider this statement:
NAME OPERATION CPERAND
1234567 8)9|10 11 1213 14 15 16 1718] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40,41 42 43 44 45 46 47 48 49 50,
e EE Кр , | C‘'ABCD'(5,2) 11114100
1 ' 4 1 dea Loa i * - 1 -
The length attribute of the literal C'ABCD'(5,2) is 10; but the length attribute of the
symbol B1 is 2, because the operand is a relocatable term. In all other cases, the symbol in
the name field receives the length attribute of the first data field in the operand.
If the location counter (*) is referenced in the operand field, the value attribute of the
symbol in the name field replaces the operand. For example, TAG WDD *,*,* generates
three words of data, each assigned the value attribute of TAG. If TAG is equal to to 1004,
then 1004 1004 1004 1s generated.
For example, the following statement specifies that two 8-byte fields of all zeros are to be
generated. TAG represents the address of the first byte of generated data.
NAME OPERATION OPERAND
1254 5 6 7 8]9[10 1112.13 14 15 16 17/18) 19 20 21 2223 24 25 26 27 78 29 30,31 32 33.34 35 36 37 38 39 40 4) 42 43 44 45 46 47 48 49 50,
bel
TAG | WDD =: |]9C4,2), 94,2)
. E. i 4
If the location counter is pointing to OOFE, TAG is equal to OOFE and the storage locations
are as follows. (The last byte is 010D or TAG+15.)
Locations Contents
OOFE 00 00
0100 00 00 .
0102 00 00 First operand
0104 00 00
0106 00 00
0108 00 00
010A 00 00 Second operand
010C 00 00
If the location counter is pointing to an odd-byte address when a WDD statement is
encountered, the assembler automatically updates the counter to the next word boundary
and does not affect the contents of the odd-byte address.
In the preceding example, if the location counter is pointing to OOF D, the assembler updates
the counter to OOFE and the contents of OOFD are unchanged. The storage locations are as
follows. I
8-4
9. LISTING CONTROL STATEMENTS
The listing control statements control the printing of the lines of code generated by the
assembler. The statements themselves are used only for the source listing and are not carried
over to the object program.
The assembler mnemonics and functions of the listing control statements are:
TITLE Identifies the listing.
EJECT Starts a new page.
SPACE Inserts blank lines.
PRINT Specifies the details to be printed.
TITLE, SPACE, and EJECT statements do not appear in the source listing.
TITLE — IDENTIFY LISTING
The TITLE statement specifies the program 1D and the heading to be printed on each page
of the listing. The format of the TITLE statement is:
Name Operation Operand
Symbol TITLE Character string constant
or blank
The first symbol (except a sequence symbol) in the name field of any TITLE statement is
printed in the program ID area at the top of each page of the entire listing. The name field
of all other TITLE statements must contain a sequence symbol or a blank.
The character string in the operand field specifies the heading for each page. Any variable
symbols in the character string are resolved. The resolved character string must not be more
than 90 characters.
When the TITLE statement appears in a source program, the assembler ejects the current
page and prints the specified title on the top of the next page. This title is printed on the
top of each page until another TITLE statement appears. a
In the following example, PGM1 and FIRST SUBROUTINE is printed on all sheets of the
listing until another TITLE statement appears:
9-1
NAME OPERATION OPERAND
123448567 8|9|10 11 12 13 14 15 16 17{18] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 4344 45 46 47 48 49 50,
ао
- 'EM l AA AA EA "ITLE 4 La 220 С | IRS Г. SUBROUT INE. + 4 ааа рана а
A A AA A A a - | 4 à a AA A LN A AAA od A AAA Aa Ae ad AAA AAA
ba a de AAA A Ann I Г
Assume that this heading has been printed on six sheets, and the following TITLE statement
is encountered while the sixth sheet is being printed. |
МАМЕ OPERATION OPERAND
1234567 8/9/10 11 1213 14 15 16 17/18/19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35:36 37 38 39 40 41 42 43 44 45 46 47 48 49 50,
gd nh denn de
.SECD... | TITLE... | |C' SECOND. SUBROUTINE". . .. .......
AAA ALA AA A Loan e AI LL
| AA de A de AA J Ba
The assembler halts the printing and ejects the sixth sheet. The new heading, SECOND
SUBROUTINE, is printed on the seventh sheet. Printing then continues with the seventh
sheet. Note that a sequence symbol in the name field does not change the program 10.
EJECT — START NEW PAGE
The EJECT statement ejects the remainder of the page and resumes the printing at the top
of the next page. The format of the EJECT statement is:
Name Operation Operand
Sequence EJECT Not used — ignored by the
symbol or assembler
blank
The EJECT statement can be used to separate routines in a program listing. Two successive
EJECT statements leave the remainder of the current sheet plus the entire next sheet blank.
A TITLE statement immediately followed by an EJECT statement produces a page that is
blank except for the heading specified in the TITLE statement.
SPACE — INSERT BLANK LINES
The SPACE statement inserts one or more blank lines in a listing. The format of the SPACE
statement is:
Name Operation Operand
Sequence SPACE Absolute
symbol arithmetic expression
or blank
9-2
The assembler evaluates the expression in the operand field to determine the number of
lines to leave blank. Symbols in the expression must be previously defined. If the number of
lines to be left blank exceeds the number left on the current page, the SPACE statement
functions as an EJECT statement, and the next line is printed on the top of the next page.
An example of a SPACE statement is:
NAME OPERATION OPERAND
1234 56 7 8|9]1011 1213 14 15 16 17/18) 19 20, 21 22 23 24 25 26 27 28 29 30,31 32 33 34 35 36 37 38 39 40 41 42 4344 45 46 47 48 49 50,
“ERST | SPACE ||CA<EQ>B)XSEL .......———
ha AL a AA
PRINT — PRINT OPTIONAL DATA
The PRINT statement controls the extent of the printing. The PRINT statement cannot
appear within a macro. The format of the PRINT statement is:
Name Operation Operand
Sequence PRINT One to four operands
symbol separated by commas
or blank
The operands, which may appear in any order, specify the amount of data to be printed.
The two choices for each operand are: | |
1. ON A listing is printed.
OFF No listing is printed.
2. GEN All statements generated from a macro instruction
are printed.
NOGEN Only the macro instruction is printed.
3. DATA Generated data is printed in full.
NODATA Only the leftmost eight bytes of generated data are
printed.
4. COND Conditional statements are printed.
NOCOND Conditional statements are not printed.
The operand cannot contain a variable symbol. Each condition specified by the operands
remains in force until it is changed by another PRINT statement. A program can contain
any number of PRINT statements. If a PRINT statement does not appear in a program, or
until it does appear, the assembler assumes the following conditions: PRINT
ON,NODATA,GEN,NOCOND.
9-3
For example, the following statement requests the assembler to assemble 256 bytes of
zeros:
NAME OPERATION OPERAND
12 34 5 6 7 8] 91 10 11 12 13 14 15 16.17] 18} 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47:48 49 50,
T AB 1 Ed da AE E E a | 9.256) 4 A L. i E т 4 x Lod A X. A ud a A A + а 4 L de. i i A
. 1
ar a AA с. ааа ааа
AAA A i 1 1 A. A i 4 4 4 LE... A.
Are A Da a Aa 4004 M. al a. Ra
If the operand DATA is included in the last PRINT statement, the listing contains all 256
bytes of zeros. If the last PRINT statement included the operand NODATA, only eight
bytes of zeros are listed.
If the operands of a PRINT statement are contradictory (such as OFF and DATA), the
assembler determines the printing according to the following priority:
1. ON or OFF
2. GEN or NOGEN
3. DATA or NODATA, and COND or NOCOND
When NOCOND is specified, conditional statements with errors are printed unless OFF is in
force, or the statement occurs in a macro when NOGEN is in force.
Note that the line numbers generated will not be in sequence when NOGEN or NOCOND is
specified. Jumps in the line numbers indicate that statements were not listed due to NOGEN
or NOCOND. However, if the suppressed statements contain errors, the error messages still
refer to lines which do not appear in the listing.
9-4
10. MACRO LANGUAGE AND CONDITIONAL
ASSEMBLY STATEMENTS
The macro language and conditional assembly statements are so closely related that it is
difficult to explain either concept by itself. Thus, this section is divided into two
subsections. The first explains the basic structure and application of the macro language.
Sufficient information is supplied to write a simple macro definition and instruction. The
second subsection deals with specific conditional assembly statements and their use within
more complex macros and assemblies.
MACRO LANGUAGE
The macro language provides a convenient way to generate a desired sequence of assembler
statements many times in one or more programs. The principal features are the macro
definition and the macro instruction. The macro definition is a composite piece of coding
which serves as a prototype for generating source statements. The macro instruction is a
single statement which calls the macro definition for assembly and assigns values to the
variable symbols in the macro definition.
The macro definition is written only once; the macro instruction is written each time a
programmer wants to generate the desired sequence of statements. This facility can help
simplify the coding of a program and reduce the chance of coding errors.
Macro definitions must appear in a source program before all PUNCH statements and
statements pertaining to the first control section; consequently, only EJECT, PRINT,
SPACE, TITLE, ICTL, ISEQ, and comment statements can validly precede the first macro
definition. All of these statements except ICTL can appear between macro definitions.
A macro definition cannot appear within a macro definition; however, one macro can call
another macro.
MACRO DEFINITION
A macro definition has four parts:
1. Header statement
2. Prototype statement
3. Model statements
4, Termination statement
10-1
HEADER STATEMENT
The header statement identifies the beginning of a macro definition. It must be the first
statement of a macro definition. The format of the header statement is:
Name Operation Operand
Blank MACRO Blank — ignored by the assembler
PROTOTYPE STATEMENT
The prototype statement specifies the mnemonic operation code and the format of macro
instructions that call the macro definition. The prototype statement must be the second
statement of every macro definition. The format of the prototype statement is:
Name Operation Operand
Symbolic Mnemonic 0 — 35 symbolic parameters
parameter operation
or blank code
The name field may be blank, or it may contain a symbolic parameter.
The mnemonic operation code in the operation field is the macro name used to call the
macro definition for assembly. This code must not be used in another macro definition, nor
can it be a recognized mnemonic of a machine or assembler instruction.
The operand field may contain O through 35 symbolic parameters, separated by commas.
The first four characters of a symbolic parameter should not be &SYS. Comments can
appear only if symbolic parameters are present.
The symbolic parameters in the name field and the operand field represent variable values
that are supplied by the programmer when he calls the macro for assembly. Subsequent
model statements use these symbolic parameters.
The operands in a prototype statement can be positional or keyword. Keyword and
positional operands cannot both be used in the same prototype statement.
Positional operands require that the operands of a macro instruction be written in the same
order as the corresponding symbolic parameters of the prototype statement. Positional
operands cannot have a default value and must begin with an ampersand (&) followed by
one to seven alphanumeric characters, the first of which must be alphabetic. Examples of
positional operands are &PAR1, &P, &P2.
10-2
Keyword operands may appear in any order in the macro definition and the macro
instruction, because the parameters are recognized by the keyword, not by the order or
position of the symbolic parameter in the prototype statement. Keyword operands may be
assigned default values. A default value must be a standard value, not a variable symbol.
Keyword operands are similar to positional operands, except that keyword operands are
immediately followed by an equal sign and optionally followed by a standard value. If a
value is not assigned, the default value is null. Examples of keyword operands are:
&PAM1=22,&P=C'ABCD', &PAM3=. |
The length of a prototype statement can be any number of lines. Continued lines must end
with a semicolon. A semicolon may not be the first character of a continuation line.
MODEL STATEMENTS
Model statements are the macro definition statements from which the assembler language
statements are generated. Zero or more model statements may follow the prototype
statement. In the use of special characters, model statements must follow the same rules as
macro instruction operands. The rules pertaining to special characters in macro instructions
are discussed under Special Characters in a Macro Instruction later in this chapter. Model
statements must also follow the normal continuation line rules, and statements generated
from model statements must not require more than 160 characters. Only generated
statements appear in the listing. The format of the model statement is:
Name Operation Operand
Any symbol Instruction or Any symbols or terms
or blank variable symbol
The name field may be blank, or may contain a symbol. Because a seguence symbol inside a
macro definition is local to that definition, the same sequence symbol can be used in
another macro or outside the macro definition. However, within the same macro definition,
a sequence symbol can be generated only once. Thus, a sequence symbol may be used in
more than one model statement, provided that the statements which duplicate it are skipped
due to conditional assembly. Note that because prototype statements are not generated, the
symbol in the name field of a prototype staternent can be duplicated and generated in a
model statement. The characters * and . * or a sequence symbol cannot be substituted for a
variable symbol in the begin position of a model statement. If the model statement is an
inner macro instruction, the name field must follow the rules for macro instructions.
A variable symbol can be concatenated with other characters in the name field.
The operation field may contain a machine instruction, an assembler instruction, a macro
instruction, a form instruction, or a variable symbol. However, the following assembler
instruction mnemonics cannot be used in the operation field of a model statement:
MACRO, PRINT, ISEQ, ICTL, and END. Variable symbols cannot be used to generate an
ADO, AGO, ANOP, SETA, SETC, PUNCH, MEXIT, GBLA, GBLC, MNOTE, CSECT, COM,
MACRO, SEG, PRINT, ISEQ, ICTL, or END mnemonic, or macro instruction mnemonic
operation codes. |
10-3
The operand field may contain ordinary, variable, or sequence symbols, or other terms,
depending upon the instruction in the operation field. A symbolic parameter in the operand
field of a model statement must first be defined in the prototype statement. Comments can
appear after the last operand. No substitution is made for variable symbols in a comment.
A model statement may be a comment statement. An asterisk in the begin column indicates
that the entire line is a comment statement. The assembler converts a model comment
statement into an assembler language comment statement.
The programmer may also write comment statements in a macro definition which are not to
be generated. These statements must have a period in the begin column, immediately
followed by an asterisk and the comment (.*comment).
The line following a PUNCH model statement is the only exception to model statement
format rules. Format rules do not apply because the line contains output data, and all
characters between the begin and end positions are in free format. Substitution is performed
for all variable symbols between the begin and end positions.
Relationship of Model and Prototype Statements: Figure 10-1 illustrates the relationship
between model statements and the prototype statement. Notice that the symbolic
parameters &TAG1, &TAG2, &TAG3, and &TAG4 are defined in the prototype statement
before they are used in the model statements.
„3 7} va N
2 17
NAME OPERATION Faber
§
1234567 89/10 11 1213 14 15 16 17) 18416 20 21 22 23 24 25 26 27 28 29 50 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50,
pr
AVE, S . RdA ADA A Ad E
de AA AA 44e 40 0 À
1 l AGL, 5 1 à в ı | вок ааа ВР Men en nn A
1 ] a 63 J 5 2081 420 A... 0 коса ща анна RL +
] L 1 t 1 A. 4 Aena, A 1 1 I L [UNA a 1
4 Lo 1 1
1 i 1 1 1 E 1 1 1 A.
A -
de — A — nd A A - ... E „Ad 4 .. a. E = 1 - . но A A... ds не ms не = pe = к Ве. A.
7
Е T4. Г
E Le 5 ‘ в 1 4 в od 1 1 1 1 1 i Lode LA La ko bx ML uk Real AL kL he —
a
+ + a 1 1 4 — + a 4 + 1 + L 41 4 i
_— 5
- e
| + ' a С 1 dao E AL а 1 Ad de. + L A — AL
DN > ий
a a + E oe ha 7 P. a 1 A Lu a L LL.
Ad A 1 на AA A... A 1. 1 1 L EL... A. ара 4 AA de. A EL
F Ey 7 Ч „ 7
> 7
e among Pi Th a a ) A р S # 1 ho 7 1 — 1 а 1 + A.
Tr.
— + | | + ra a LÀ a x med AA AA L x a dL dL ALL +
; Fe +,
© “a Fam Lary ab ры
wf : >. a + / Ч
5 haa” re i
Figure 10-1. Macro Definition : 104010 EAT
4 I ’
10-4
o... | MACRO.
{ВЕСТА DIVIDE {145 FTAGAATAGS,ATACH — ATENTO
da”
FE à
G I ; Top { A # La
1 rr 1 à 1 4 1 L LAA. . done AAA a dedo Lado la. Ade — A ie Seah
TERMINATION STATEMENT
The termination statement specifies the end of a macro definition. It can appear only once
within a macro definition and must be the last statement of the definition. The format of
the termination statement is:
Name Operation Operand
Sequence MEND Blank — ignored by the assembler
symbol or
blank
MACRO INSTRUCTION
The macro instruction performs the following functions:
1. Calls the macro definition for assembly.
2. Assigns values to the symbolic parameters in the macro definition.
The macro instruction closely parallels the prototype statement. The values in the macro
instruction are equated to the symbolic parameters in the prototype statement. The format
of the macro instruction is: |
Name Operation Operand
Ordinary Mnemonic 0 — 35 operands
symbol, operation
sequence code
symbol,
or blank
The name field may be blank, or it may contain an ordinary symbol or a sequence symbol.
An ordinary symbol is defined in the assembly only if a symbolic parameter is both in the
name field of the prototype statement and in the name field of a model statement. If the
model statement which has the symbolic parameter in its name field is skipped as a result of
conditional assembly, the statement is not generated. Consequently, the ordinary symbol in
the name field of the macro instruction is also not generated.
10-5
A sequence symbol in the name field of the macro instruction is never carried over to the
name field of the generated model statement. This sequence symbol can only be used in the
operand field of an AGO statement — never as the second operand of an ADO statement.
The mnemonic operation code in the operand field must be previously defined in a macro
definition or in the system macro library.
The number of operands in the operand field may not exceed the number of operands in the
prototype statement. An operand can have up to 127 characters.
POSITIONAL OPERANDS
If the prototype statement has positional operands, the operands of the macro instruction
correspond to the symbolic parameters in the prototype statement, and the operand values
are applied to the symbolic parameters in sequence. If the macro instruction has fewer
operands than the prototype statement, the unmatched symbolic parameters in the
prototype are assigned null values, not blanks. Two contiguous commas in the operand field
indicate an omitted operand, which is also assigned a null value. The examples in Figure
10-2 illustrate positional operands. |
Prototype: &LABEL POS &TAB1,&TAB2,&TAB3 Values: &TAB1 = 42
Instruction: .FIRST POS 42,15,63 &TAB2 = 15
&TAB3 = 63
Instruction: SEC POS 16,2 Values: &TAB1 = 16
&TAB2 = null
&TAB3 = 2
Figure 10-2. Macro Instruction — Positional Operands
KEYWORD OPERANDS
If the prototype statement has keyword operands, the macro instruction must also have
keyword operands. The instruction keyword, which is all characters before the equal sign,
must directly match the keyword in the prototype operand, except that the instruction
keyword operand is not preceded by an ampersand. The value following the equal sign in
the macro instruction is assigned to its corresponding symbolic parameter. Symbolic
parameters not matched by a macro instruction operand retain their default value. The
examples in Figure 10-3 illustrate keyword operands.
10-6
Prototype: &LBL KEY &PARM1=5,&PARM2=,8&PARM3=C’'VALUE’ Values: &PARM1 = 100
Instruction: .THD KEY PARM3=C'PRICE',PARM1=100 &PARM2 - nuli
&PARM3 = C’PRICE"
Instruction: .FOUR KEY PARM1=ABCD PARM2="7B Values: &PARM1 = ABCD
&PARM2 = “7B
&PARM3 = C'VALUE’
Figure 10-3. Macro Instruction — Keyword Operands
SPECIAL CHARACTERS IN A MACRO INSTRUCTION
A macro instruction operand may consist of any combination of up to 127 characters,
provided the syntactical rules for the following special characters are observed. These
characters have special meanings in a macro instruction operand.
o escape character (#) e comma
e ampersand e semicolon
e apostrophe e blank
o parentheses
Escape Character
The first character after an escape character retains its literal value. Therefore, if a special
character is to retain its literal value, it must be preceded by an escape character. For
example, the following operand field has three operands:
HICE.B, 4, A, XYZ
— er”
1 2 3
Escape characters are part of the operand value and are carried over to the model statements.
Ampersand
An ampersand followed by a letter indicates the start of a variable symbol. During assembly,
the current value is substituted for all variable symbols found in a macro instruction. In the
following example, only &V1 is substituted.
C'A&V1#&V2',C' #&VI#&V4A AB+X' &V1
10-7
Apostrophe
An apostrophe immediately preceded by the letter C signifies the start of a character string
constant. The character string constant extends to the next apostrophe. Parentheses,
commas, and blanks lose their special meanings when they are enclosed in a character string
constant, as in the example:
C'A,BC( 539°
The comma, blanks, and left parenthesis are part of the character string constant. In any
other context, the apostrophe retains its literal value. |
Parentheses
An operand beginning with a left parenthesis and ending with a right parenthesis signifies an
operand sublist. Within a sublist, the comma is a suboperand separator, not an operand
separator. Special characters, other than the comma, retain their special meanings within a
sublist. Parentheses that do not specify an operand sublist retain their literal value.
Examples of operands with parentheses are:
A, (B,C) Two operands: [A] [(B,C)]
A(B,C) One operand — operand does not begin with a left
parenthesis
(A+B)/2(R,4) One operand — operand does not begin and end
with matching parentheses
Comma
The comma separates operands or suboperands, unless the comma is inside a character string
constant, preceded by an escape character, or follows a left parenthesis that is not the
opening parenthesis of a sublist. In these three cases, the comma retains its literal value.
Examples of operands with commas are:
A,B,C Three operands: [A ] [B ] [C]
A#B#,.C One operand: comma preceded by #
B(C,4+K One operand: comma preceded by (
Semicolon
The semicolon indicates line continuation. Characters following a semicolon are considered
comments. The semicolon cannot be the first character of a continuation line. The current
line continues with the first nonblank character of the next line, as in the following
example:
10-8
A,BHCD,52,;HERE HERE is a comment. The four operands are:
CON | [A ] [BHCD ] [52 ] and [CON].
Blank
A blank signifies the end of the operand field. Characters following a blank are considered
comments.
SUBLISTS IN MACRO INSTRUCTIONS
To group a number of suboperands as a single symbolic parameter value, the macro
instruction operand is. written as a sublist. À sublist consists of one or more suboperands
separated by commas and enclosed in parentheses. Each suboperand has form identical to an
operand. The entire sublist including the parentheses is considered one macro instruction
operand.
Omitted suboperands have a null value. However, the operand () is considered a character
string, not a sublist with all the suboperands omitted. The operand limit of 127 characters
applies to the entire sublist. Examples of valid sublists are:
(A,2,4,16) Four suboperands
(A+40,B(2,6),(N,M),240/C+X) Four suboperands
SUBLISTS IN MODEL STATEMENTS
In a macro instruction operand, a sublist can assign a set of values to a single symbolic
‘parameter of the macro definition. Any model statement may reference the entire symbolic
parameter, but only a SETA, SETC, or ADO statement can reference the suboperands of the
symbolic parameter. |
The format used to reference a suboperand is: symbolic parameter (n).
The subscript n is an arithmetic set expression that refers to the position of the suboperand
being referenced. For example, &LIST(2) references the second suboperand of the symbolic
parameter, &LIST.
If the sublist (A,,C20,192',(N,M)) is a macro instruction operand corresponding to the
symbolic parameter &FIEL D, the values assigned to the suboperands are:
FIEL D(0) = null
FIELD(1) = A
FIELD(2) = null
FIELD(3) = C20
10-9
FIEL D(4) ='192’
FIELD(5) = (N,M)
FIELD(6) through FIELD(n) = null
A subscripted reference to an omitted sublist element, such as FIELD(2) above, is assigned a
null value. If the macro instruction operand is a simple operand, rather than a sublist, the
macro instruction can refer to the operand value by the symbolic parameter without a
subscript, or by the symbolic parameter with a subscript of 1. All other subscripted
references have a null value.
Suboperands of sublists within a sublist (for example, N in FIELD(S) above) cannot be
referenced in a model statement.
SUBSTRING NOTATION
Substring notation allows the programmer to reference part of a macro instruction operand
or a character string constant. Substring notation consists of a symbolic parameter or a
character string constant, immediately followed by two arithmetic set expressions separated
by a comma and enclosed in parentheses, as in the examples:
&NAME(2,4)
C'AB24CFG'(&P1,2)
The first expression indicates the position of the first character to be included in the
substring. The second expression indicates the number of consecutive characters (beginning
with the character indicated by the first expression) to be included in the substring.
If the substring specifies more characters than are in the macro instruction operand or in the
character string constant, only the number of available characters are supplied. If the
starting character is outside the range of the string, a null character is supplied.
Substring notation has the following limitations:
1. Substrings can only be specified for character string constants and
macro instruction operands.
2. A substring of a sublist cannot be specified.
3. A substring reference can only be used as a term in a conditional
assembly statement.
Consider the example in Figure 10-4.
10-10
Prototype: &LABEL WRITE &P1,8P2,8P3 Values: &P1 = 24
Instruction: .FIRST WRITE 24 C'ABCDE",734A &P2(3,3) = ABC
EP3(1,2) = 73
Figure 10-4, Examples of Substring Notation
CONCATENATION OF VARIABLE SYMBOLS
Variable symbols in model statements can be concatenated so that the name field, operation
field, or operand field can be modified by a macro instruction. Thus, the mnemonic
instruction DIV can become DIVA, DIVB, or DIVC, and the operand FIELD can become
FIELDA, FIELDB, or FIEL.DC.
The example in Figure 10-5 illustrates concatenated operation codes and operands in a
macro definition.
NAME OPERATION OPERAND
12349567 8/9/10 11 1213 14 15 16 17| 18] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 4344 45 46 47 48 49 50,
PL des pete E E E анна rer ES E E E VE E
AA MAC RO DEFI NI TION AA AAA AA de AAA Ad Adra da lL Lf ad bb
Led AA Aa A,
т Hz 475, ar, as, Temi
AVES a В
TIST2, 4... ans
ана
BEGIN .
BEGIN
|. - Le. . E 1 4 dea. i a 1 A 1 A E 4 Ad. LE. 1 - 1 4 не но 1. - 1 4. .
| анна а MAC RO INS | RUC 1 ION aaa a ah ANAL а Lens A AL Ae Ad Lea AA. A nd AA Ade A +.
HERE... | DIVIDE | FIELD, в Das 3 ,. sA,R R В ee
[A MACRO EXPANSION AAA Aa AAA AA AAA A о 2.4
a. La LL A AA 1 PE а 1 1 : а 4 i 1 L d.— 1 L A | П 1 few. À 1 1 A A E на A
7 a BN . LL fp +- LoL 1 4 1 1 Novo Bm E um 2 1 x a а 1 1 1 4 x 1. A. dame dee A 4. - ` AA dea De а A. A
{1 2345678 9110 11 12 13 14 15 16 17} 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50°
| Figure 10-5. Concatenation of Variable Symbols
10-11
NESTING OF MACROS
A model statement in a macro definition may be a macro instruction that calls another
macro. Model statements used as macro instructions are called inner macro instructions.
Macro instructions not used as model statements are called outer macro instructions.
Rules for inner macro instructions are the same as for outer macro instructions. Symbolic
parameters in an inner macro instruction are replaced by the corresponding characters of the
outer macro instructions. Sublists of an outer macro instruction cannot be passed as a
sublist to an inner macro instruction.
An outer macro instruction is a first level macro instruction. The first inner macro
instruction is a second level instruction, the second inner macro instruction is a third level,
and so on. Five levels of macro instructions are allowed. Within each level, any number of
macro instructions may be used.
Figure 10-6 demonstrates the inner and outer macro instructions and the various levels of
instructions. |
Source
Program
MACRO > MACRO MACRO
READ COMPUTE DIVIDE
Model Mode! Model
READ Model Modei Model
COMPUTE Mode: Model
Model X DIVIDE MEND
Model * Mode! “
END Model \ MEND © \
\ MEND \ \
\
\ ` “
\ \ | `
== == Outer macro — — == == Inner macro == == == Inner macro
instruction
(third level)
instruction
(second level)
instruction
(first level)
Figure 10-6. Nesting of Macros
MNOTE — GENERATE ERROR MESSAGE
The MNOTE statement is used only in a macro definition to generate an error message. The
format of the MNOTE statement is:
Name Operation
Operand
Sequence MNOTE Severity code, message or
symbol or message only |
blank
10-12
The severity code may be W — warning error, or F — fatal error. If the first character is not a
Wor an F followed by a comma, the statement is treated as a warning error.
The message may be any EBCDIC characters. The line may not be continued, and no
substitution is performed. Examples of MNOTE statements are:
Statement | | Generated Message
MNOTE W,message W MNOTE * message*
MNOTE F,message F MNOTE *message*
MNOTE Fmessage W MNOTE *Fmessage*
MNOTE message W MNOTE *message™
MEXIT — ALTERNATE TERMINATION FOR MACRO DEFINITION
The MEXIT statement indicates an alternate termination point for a macro definition. The
format of the MEXIT statement is:
Name Operation Operand
Sequence MEXIT Blank — ignored by the assembler
symbol or |
blank
When an MEXIT statement is processed, the next statement processed by the assembler is
the statement immediately following the macro instruction that called the macro. If MEXIT
is skipped due to conditional assembly, MEXIT is ignored. The MEXIT statement cannot
replace MEND as the final statement of a macro definition.
SYSTEM VARIABLE SYMBOLS — &SYSNDX AND &SYSECT
The system variable symbols, &SYSNDX and &SYSECT, are automatically assigned values
by the assembler. These symbols can be used only in the name, operation, and operand
fields of statements in macro definitions. They may not be defined as symbolic parameters,
nor can they be assigned values by SET statements.
&SYSNDX
Assigned an original value of 0001 for the first macro instruction processed, &SYSNDX is
increased by 1 for each inner or outer macro that is processed. Thus, the value of
&SYSNDX represents the current number of macro calls processed up to and including the
current call. |
10-13
The value of 8: SYSNDX always remains constant within a macro level, regardless of how
many inner macros are called. When the assembler returns to a given macro (from an inner
macro), the value of &SYSNDX in effect is the value it had when the macro was first called.
Figure 10-7 illustrates the changing value of &SYSNDX. The numbers to the left of the
model statements indicate the value of &SYSNDX as each statement is processed.
The variable symbol &SYSNDX can be concatenated with other characters to form unique
names in statements generated from the same model statements. Thus duplicate names can
be avoided when a macro is called more than once.
&SYSNDX as an arithmetic term in a SETA expression produces an arithmetic value. In
other contexts, the value of &SYSNDX is a four digit number, including leading zeros.
The example in Figure 10-8 shows how &SYSNDX can be used. All statements in the
example are part of the same macro, which is called by the eighth macro instruction
processed during the assembly.
Source
Program
MACRO MACRO
READ COMPUTE
Model 2 Model
1 Model 2 Model
1 Model 2 Model
COMPUTE = MEND
Y 1 Model
READ 1 Model
1 WRITE saña MACRO
1 Model ‘ WRITE
1 Model | 3 Model
1 Model 3 Model
Ÿ —— MEND 3 Model
END MEND
The numbers to the left of the statements indicate the value of &SYSNDX at that particular
point in the program.
Figure 10-7. Using &SYSNDX with Inner and Outer Macros
Model Statements:
&SET1 SETA &SYSNDX+10 Values: &SYSN DX+10 = 8 + 10 = 18 (in the SETA statement)
&SET2 SETC &SYSNDX &SYSNDX = 0008 (in the SETC statement)
L&SYSNDX FORM 2,6 L&SYSNDX = L0008 (in the concatenated symbol)
Figure 10-8. Examples of &SYSNDX
10-14
&SYSECT
The variable symbol &SYSECT represents the name of the control section in which a macro
instruction appears. The value assigned to &SYSECT is the name of the last CSECT or COM
statement that precedes the current macro instruction. If no CSECT or COM statement
appears before the macro instruction, &SYSECT has the value of two blanks.
In any given macro definition, the value of &SYSECT is constant, that is, the name of the
last CSECT or COM statement before the macro instruction. During nested macro calls,
&SYSECT in an inner model statement refers to the last active CSECT or COM statement in
the next outer macro definition. Note the value of &SYSECT in Figure 10-9.
Source Program
FIRST COM MACRO MACRO
ee READ AT SCRIP
‘ Model ~THRD COM
Y TT Model AC Model
READ SCND COM &SYSECT CSECT
D SCRIP | Model
| &SYSECT ser ——— Vode!
| В Model MEND
|
Model | |
MEND —
|
| | |
Value of &SYSECT is FIRST. Value of &SYSECT is SCND.
Figure 10-9. Example of &SYSECT
CONDITIONAL ASSEMBLY STATEMENTS
Conditional assembly allows the programmer to specify assembler language statements
which may or may not be assembled, depending upon conditions evaluated at assembly
time. These conditions are usually tests of values, which may be defined, set, changed, or
tested during assembly. Thus, different sequences of statements can be generated from the
same macro definition.
Almost all conditional assembly statements can be used inside or outside macros, although
their primary use is inside macros. The macro language itself can be considered a type of
conditional assembly.
The conditional assembly statements are:
SETA Assigns arithmetic values to set symbols.
SETC Assigns character values to set symbols.
GBLA Defines a SETA statement as global.
10-15
GBLC Defines a SETC statement as global.
ADO Sets up a source statement generation loop.
AGO Specifies a branch to another statement; skipped statements
are not assembled.
ANOP Specifies an assembly no-operation statement.
SET STATEMENTS
The SET statements assign arithmetic and character values to set symbols which can then be
referenced in subsequent source statements. When the defined symbol appears in a
subsequent statement, the assembler replaces the symbol with the assigned value.
If two SET statements assign different values to the same set symbol, the last value assigned
to the symbol is the value currently in effect. |
SET statements can appear within or outside a macro definition; however, a set symbol
defined within a macro is local to that macro unless it is specifically declared global.
A set symbol defined outside a macro can be referenced for its assigned value from
anywhere in the source program. The same variable symbol may not be used as a symbolic
parameter and as a set symbol within the same macro definition; nor can the same variable
symbol be used in a SETA and a SETC statement, if the symbols are defined within the
same scope.
SETA — ASSIGN ARITHMETIC VALUE TO SET SYMBOL
The SETA statement assigns arithmetic values to set symbols. The format of the SETA
statement is: |
Мате Operation Operand
Set symbol SETA Arithmetic set expression
The set symbol in the name field may not be generated as a result of substitution, that is,
the name field must be explicitly coded.
The expression in the operand field is evaluated as a 16-bit arithmetic value which is
assigned to the set symbol in the name field. |
10-16
An arithmetic set expression may consist of one term or an arithmetic combination of
terms. The procedure used to evaluate an arithmetic set expression is the same as that used
to evaluate arithmetic expressions in assembler language statements. The only difference
between the two expressions lies in the terms that are allowed. The terms that may be used
in an arithmetic set expression are:
Arithmetic Terms Example
Arithmetic constants 2463 or “FOF?
SETA symbols &S1
&SYSNDX references &SYSNDX
Count attribute references K'&P1
Number attribute references N’&P2
Character Terms Example
Symbolic parameters, including
sublist and substring
references &P3(&P1)
SETC symbols, including
substring references | &S
Substrings of character constants C'ABCDE’(2,3)
&SYSECT references &SYSECT
Character constants C'ABC”
Any character term except a character constant may appear as a single term, or be used as
an operand in arithmetic and logical operations, provided the resultant character string
contains only numeric characters. When used in this context, the value of the character
string, that is, its decimal equivalent, may not exceed 65,535.
Any character term may be used as an operand in a relational operation. In this context, the
term is always treated as a character constant, even if it consists solely of numeric
characters.
Since conditional assembly statements represent the tools for source statement generation,
they cannot themselves be the object of substitution, nor may they be concatenated. For
example, if the character constant C'&P1" appears as a term in an arithmetic set expression,
its value is &P1 regardless of the actual value of &P1.
10-17
The following are examples of valid SETA statements if &P1 and &P2 are symbolic
parameters with values (64,4,ABC) and AB246C, respectively.
&51 SETA 8
&S2 SETA “4A
&S3 SETA &S1+&S2
&54 SETA &P1(1)+&P2(&P1(2),2)
&S5 SETA (&P1(3) <EQ>C'ABCDE'(1,3)+8&P2(4,1))/2
&S6 SETA &P2(3,3)<EQ>C'246"+N'&P1
Examples of invalid arithmetic set expressions are:
A+2 Reference to ordinary symbol
=C'AB" Literal term
2+L'BETA Length attribute reference
&Р1(1) <ЕО >64 &Р1 (1) is considered a character string, the second
operand in the relation must be coded as a character
term, that is, C'64"
Р'-240° String constant other than a character constant
C'ABC’ Character constant not used in a relation
&P1&P2 Concatenation of symbols
SETC — ASSIGN CHARACTER VALUE TO SET SYMBOL
The SETC statement assigns a character value to a set symbol. The assigned character value
can be passed with the set symbol to another statement operand. The format of the SETC
statement is:
Name Operation Operand
Set Symbol SETC Character term or
arithmetic set expression
The set symbol in the name field may not be generated as a result of substitution, that is,
the name field must be explicitly coded.
10-18
The operand field may contain an arithmetic set expression or one of the following
character terms:
Term Example
Symbolic parameter, including sublist &PARM2(3)
and substring references
SETC symbol, including substring &SET1
references
Substring of a character constant C'ABCDE'(2,3)
&SYSECT reference &SYSECT
Character constant CABCD'
&SYSNDX reference &SYSNDX
Only one operand is allowed. The maximum size of an assigned character value is 16 bytes.
If a larger value appears, only the leftmost 16 bytes are assigned by the assembler.
When &SYSNDX is used as a single character term, the value is a string of four characters,
including leading zeros. If the operand specified is an arithmetic set expression, the
arithmetic value is converted to a 16-bit constant.
Examples of valid SETC operands are:
C'24BK’
&P1
&P1(2,4)
&P1&P2(2,1)
&SETC
&SYSECT
&SYSNDX
(&SYSNDX+10-&P1(2,4)/2)*&P2(2) <EQ>C'FID’
Examples of invalid SETC operands are:
X'124" String constant other than a character constant
C'AB2'+4 Character constant used as arithmetic operand
ALPHA Ordinary symbol
L'ALPHA Length attribute
10-19
GBLA AND GBLC — GLOBAL ARITHMETIC AND CHARACTER SET SYMBOLS
Local set symbols are made global (available outside the macro) by a GBLA or GBLC
statement. The format of the GBLA or GBLC statement is:
Name Operation Operand
Blank GBLA and 1-35 set symbols,
GBLC separated by commas
Global statements must appear immediately after a prototype statement or after another
global statement. Any number of continuation lines may be used.
When a set symbol is declared global, its assigned value is available to statements in the main
program, but not to other macro definitions. To be available to other macro definitions, the
set symbols must also be declared global in those macro definitions.
If set symbols have not been assigned values outside this macro definition or by a previous
call to this definition, the global statement assigns an initial value of 0 to SETA symbols and
a null character value to SETC symbols. If the set symbols have an assigned value, the global
statements do not affect the value of the set symbols.
ADO - ITERATIVE RETURN
The ADO statement sets up a loop between the ADO statement and a subsequent statement
identified in the ADO statement. The format of the ADO statement is:
Name Operation Operand
Seguence ADO Positive arithmetic set
symbol, set expression, sequence symbol
symbol, or
blank
The sequence symbol in the name field can only be referenced by an AGO statement.
The operand field must have two operands, separated by a comma. The first operand is a
positive arithmetic set expression that indicates the number of iterations to be executed.
The second operand is a sequence symbol that specifies the last statement of the loop. This
sequence symbol must appear in the name field of a statement that follows, not precedes,
the ADO statement. The sequence symbol cannot be in the name field of another ADO
statement, a macro instruction, or an AGO statement.
If the set expression is equal to zero, control is transferred to the statement named in the
second operand, and no intervening code is included. However, if the first operand is a
positive number, the assembler subtracts 1 from the first operand and includes in the
assembly all the code from the ADO statement to the statement named in the.second
operand. If the first operand is zero after the subtraction, the assembler does not return to
the ADO statement but processes the next statement. If the first operand is not zero after
the subtraction, the assembler again subtracts 1 from the first operand and repeats the loop.
10-20
Notice that when the first operand initially is zero, the jump is made to the statement
named in the second operand. When the first operand is not initially zero, the indicated
number of loops is performed and a jump is made to the first statement after the statement
named in the second operand. If the first operand is invalid, the value is set to 1.
The name field may contain a sequence symbol, a set symbol, or a blank. If the name field
contains a set symbol, the symbol is initially assigned a value of 1. For each iteration, this
value increases by one while the first operand of ADO decreases by one. Thus, in the
following example, after 10 iterations, the first operand is 0 and &COUNT is 10.
NAME OPERATION OPERAND
12344567 8/9|10 11 1213 14 15 16 17/18/19 20 21 22 23 24 25 26 27.26 29 30 31 32 33 34 35 36 37 38 39 40 41 42 4344 45 46 47 48 49 50.
{COUNT - ADO... 1g, BND... a aa
ded nn — + 1 1 а L 4 Roa ok фон dd Add dk nd kde AAA $e AR A Add AA AAA. A L
E — A + L _ + a iL +4 Loaded. ARS 1 4 AL A Ab A dh ed 1
H + Chee] _ a — a a 1 + A — s Aa AAA + |
| do + | 1 \ L 1 1 L. _L L mu. 1 A 0 — 4... L A 1 1
The preceding statement performs a function equivalent to the following three statements.
During the first iteration, & COUNT equals 1 and the first operand (10) is decreased by one.
After 10 iterations, &COUNT equals 10 and the first operand equals 0. Control is then
transferred to the first statement following the .END statement.
NAME OPERATION OPERAND
1 2 3 4 5 67 89]10 11 1213 14 15 16 17/18) 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 3839 40 41 42 43 44 45 46 47 48 49 50,
§COUNT … SETA а He LL
ÉCOUNT | [SETA ol “e Bits (E
1 ad a A dl A Lee A dd L L NA 1 4 i 1 L 1 i 1 x 1 1 1 tbe A 4
E 1 Lado LA RA doa À E 1... L 1,
яой к. e AAA dd Ea A AA A ALA de de 1 L L 1 1 i k L » 1 1 L 1 1... 4
The ADO statement can be used to include or exclude code from the assembly, depending
upon the value of the first operand, as in the following example. If the variable symbol
&LABEL is equal to YES, the first operand of the ADO statement is 1, and all intervening
code is included in the assembly. If, however, & LABEL is not equal to YES, the first
operand is zero and all intervening code is excluded.
NAME OPERATION OPERAND
1.2 3 4 5 6 7 8|9|10 11 12 13 14 15 16 1718) 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50°
КЕТЬ. | ADO... {LABEL <EQ>C" YES’ > AL a.
„А. Ah Ae AN oP. | - Ad AA AAA AL. A. do {AL
lL aa A Ao AA on MA dd Ed A dd A A A AA de A A AAA AAA AA
A A AA LAA dd Ad do EA AAA AAA A AAA AAA A AA AAA Ad Ad de AAA he
| aa Aa AA BA de Add AA | AA AAA MAA dr AAA AAA A AA AMA Ae AAA AA AAA
NESTING OF ADO STATEMENTS
As many as six ADO statements can occur within a primary ADO loop. Such nesting of
ADO statements increases the total number of iterations in geometric progression. If five
iterations are performed by an outer ADO loop, an inner ADO with five iterations increases
the number of iterations to 25. An inner ADO statement cannot reference a statement
outside one referenced by the outer ADO.
The following statements produce a 5 x 5 matrix containing all products of the ordinary
numbers 1 through b.
NAME OPERATION OPERAND
1.2 3 4 5 6 7 8|9]10 11 12 13 14 15 16 17/16) 19 20 21 22 23 24 25 26 27 28 29 30, 31 32 33 34 35 36 37 38 39 40,41 42 43 44 45 45 47 48 49 50,
COL, неон НЙ ‚| №9) * END. A 8 O nnd
ОМ... ob eo Ebr vaio da AA Aedo dt AAA A dd de ed LA
.END |} | CoLw RoW aaa A
During the first iteration of the outer ADO (named &COL), &COL equals 1 and 8:ROW
increases by 1 with each iteration of the & ROW ADO statement until &ROW equals b.
During this first iteration, the statement .END WDD &COL *&ROW produces the values 1,
2, 3, 4, and 5, as shown in the first column of values in this matrix.
*
First Pass of the Outer ADO
&COL
2 3 4 5
—
&ROW
Cth OWN —
a > WN -
During the second iteration of the outer ADO, 8:COL equals 2 and &ROW again equals 1
through 5. The second column of values is produced.
Second Pass of the Outer ADO
&COL
1 2 3 4 5
&ROW
an 2 WN -
aa wuN-—
— 00 © >
10-22
This process continues until the outer ADO has performed five iterations, at which time the
5 x 5 matrix contains the following values:
&COL
1 2 3 4 5
1 1 2 3 4 5
2 2 4 6 8 10
&ROW 3 3 6 9 12 15
4 4 8 12 16 20
5 5 10 15 20 25
AGO — UNCONDITIONAL BRANCH
The AGO statement transfers control to a statement named in its operand field. Statements
between the AGO statement and the statement to which the jump is made are not included
in the assembly. The format of the AGO statement is:
Name Operation Operand
Sequence AGO Sequence symbol
symbol or
blank
The sequence symbol in the operand field must appear in the name field of a statement
following, not preceding, the AGO statement. An AGO statement can transfer control out
of an ADO loop. If an AGO statement transfers control into the range of an ADO loop, the
source statements are processed as if no ADO loop exists.
The AGO statement cannot jump into or out of a macro. An example of the AGO statement
appears with the description of the ANOP statement in the following text.
ANOP — LABEL DEFINITION
The ANOP statement identifies a statement area to which a jump can be made. Because the
ANOP statement is used for name field identification only, it has no operands and no
operation is performed. The format of the ANOP statement is:
Name Operation Operand
Sequence ANOP Not used — ignored
symbol by the assembler
If the programmer wants to use an ADO or AGO statement to branch to another statement,
he must place a sequence symbol in the name field of the statement he wishes to branch to.
However, if the name field already has an ordinary symbol or a variable symbol, a sequence
symbol cannot be placed in the name field. To solve this problem, the programmer can place
an ANOP statement before the statement he wishes to branch to, and branch to the ANOP
10-23
statement. This arrangement has the same effect as branching to the statement immediately
after the ANOP statement.
In Figure 10-10, the AGO statement performs an unconditional branch to the ANOP
statement. All intervening code is excluded from the assembly.
NAME OPERATION OPERAND
1234567 8/9/10 11 1213 14 15 16 17/18/19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50,
- MACRO 1 1 4 + fl 4 ae Ed. A a + da AA 4 A da AAA E 4 L. E E O
e
— 4... a . A aa 1 - . а 1 а 1 a A... A A 1. à I. 1 Lr aa A... 1 A dd dad À 0442 1 M
+
Lo... de A a. нана - 5 i PRE 1 4 a . _ a 1 . a ана 1 , + - a + я ка Ao AA dd An AA A LA... a... AL
e
A EL Lo 1 L- a... 4.14 E a Ai 1 An A Le A
AGO ; 1 ‚HERE 1 1 1 1 ak AA Bo. Lo 4. A... E
o.
E 4. а 1 — 1 E i 1 я 1 1 cl [ Lea À A a +
®
4. 4. . i : 1 ай 1 + 4 L 4 ns A
e
[naa A A A A . а - x FR 1 1 1 1 1 A E i 1 1 1... Lb 1 1 1 i Lee
e HERE aa A ANO! в 1 1 1 1 (E LOL + 1.1 1 1 1 1 L а i
т
= а - L a L 4 L-- | x an
E ‘ A . . re 4 1 aa x 1 1 4. i A Arsen ke A ob Ad Ardo a nn A 4
Figure 10-10. Example of the AGO Statement
COUNT AND NUMBER ATTRIBUTES
Count and number attributes are unique to macro instruction operands. These attributes can
be referred to only in set expressions used as operands in conditional assembly statements
within macro definitions.
COUNT ATTRIBUTE
The count attribute is a value equal to the number of characters in the macro instruction
operand after substitution of variable symbols in the operand. All characters in the operand,
including escape characters, are included in this count. If the operand is a sublist, the count
attribute includes the embracing parentheses and the commas within the sublist. The count
attribute of an omitted operand is zero.
If an operand contains variable symbols, the characters that replace the variable symbol,
rather than the variable symbols, determine the count attribute.
The notation for the count attribute is K’ immediately followed by the symbolic parameter
that corresponds to the operand.
10-24
The examples in Figure 10-11 illustrate the preceding rules.
Macro Instruction Count
Symbolic Parameter Operand Attribute Count Value
&PAR ALPHA — K&PAR 8
&PAR1 | (JUNE, JULY, AUGUST) K'&PAR1 - 18
&PAR2 2(10,12) K'&PAR2 8
&PAR3 C'AB#'#3' | K'&PAR3 9
Figure 10-11 Examples of the Count Attribute
To reference the count attribute of a suboperand, K’ followed immediately by a subscripted
symbolic parameter must be used, as in the example: K'&PAR(3). K'&PAR(3) refers to the
count attribute of the third suboperand of the symbolic parameter &PAR.
NUMBER ATTRIBUTE
The number attribute is a value equal to the number of suboperands in an operand sublist. If
the operand in the macro instruction is not a sublist, the value of the number attribute is
one. The number attribute of an omitted operand is zero.
The notation for the number attribute is N’ immediately followed by the symbolic
parameter that corresponds to the operand, as in the example: N'&PAR.
In the following macro instruction, the count attribute of the operand is 19, while the
number attribute is 3:
NAME OPERATION OPERAND
+ 234 5 6 7 8[9]10 11 121314 15 16 17} 18] 19 20 21 22.23 24 25 26 27 28 29 30. 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50,
REPRO . | |(LNPUT,OUTPUT, LIST)... .. ..
ааа ай
| аа аа A 4 a
4 a x L 1 1 L Loh Aa. AA AAA da AA AA Ad AAA. Ad y 4 A 3 1 1 1 1 L A 1
The following example has three operands, each with a number attribute of 1; their count
attributes, however, are b, 6, and 4, respectively.
NAME | OPERATION OPERAND
1234506789110 11 1213 14 15 16 17/18} 19 20 21 22 23 24 25 26 27.28 29 30 31 32 33 34 35 36 37 38 33 40 41 42 43 44 45 46 47 48 49 50
~~. ....| REPRO . . | INPUT, OUTPUT LIST ...... .. ..
db 4 a A
AA Aa AAA ad i 1 ' 1 lhe wa ad
IH An nn A 4. di AAA A LAA da de Ad ed AA a AAA Ae J.-L. 1 1 A i 1 1 4 4 1 1 L
10-25
11. CONTROL LANGUAGE STATEMENTS
The Control Language for the assembler must provide the following four basic services:
1. Call the assembler into execution
2. Specify the assembly options
3. Define source input, object output, source output, and macro library
input files
4, Obtain the source program from the card reader, library member, or
spooled input
The Control Language statements for the assembler are explained below. For the exact
format of the statements, consult the MRX/OS Control Language Services, Extended
Reference manual.
Control
Language
Statement
//EXEC PGM=
//PAR
//PAR IMEM=
Parameter
ASM
Keyword options
Input-member-name
Description
Calls the assembler into execution.
Specifies the assembly options in
free form.
Specifies the name of the input source
module on the library. If omitted, the
source is assumed to be a non-
partitioned sequential data file (such
as a spooled input file).
Control
Language
Statement
//PAR OMEM1=
//PAR OMEM2=
//PAR MAXSIZ=
//PAR LIST=
//PAR XREF=
//PAR ERROR=
//PAR OBJECT=
Output-member-name
Punch-indicator
1-5 decimal digits
|
|
Parameter
YES
NO
YES
NO
el
NO
YES |
NO
COND
Description
>
>
Specifies the name of the relocatable
object module on the library. If
omitted and OBJECT=YES or COND,
the assembly is aborted.
1-10 alphabetic characters to indicate
that PUNCH output is expected. If
omitted, no PUNCH output is produced.
Specifies the approximate number of
source lines generated in the program.
If omitted, the default value is the
SYSGEN parameter, usually 1000.
Specifies whether the source program is
to be listed:
YES List source program
NO Omit listing
If omitted, the default parameter is
YES.
Specifies whether a cross-reference list
is to be generated:
YES Generate cross-reference list
NO Omit cross reference list
Specifies whether warning errors are to
be listed:
YES List warning errors
NO Omit listing
If omitted, the default parameter is YES.
Fatal errors are always listed.
Specifies under what conditions a relocatable
object module is to be generated:
YES Module is generated unconditionally
NO Module is not generated
COND Module is generated if no fatal
error occurred
If omitted, the default parameter is YES.
If the option, YES or COND, is selected,
the OMEM1 option must be specified.
11-2
Control
Language |
Statement Parameter Description
//DEF 1D= | File identifier Defines the source input, object output,
source output, list output, and macro
library input files.
//DEF ID= INPUT _Source input file .…
//DEF ID= Co OUTPUT) Relocatable output file: must 66252
В с ней bytes, blocked 1. The file must. bea
< — partitioned data file. The device must
be disc. CSD=YES
//DEF ID= OUTPUT2 Source punch file identifier: must be
80 bytes, blocked 1. The file must be
a non-partitioned sequential data set.
CSD=YES
//DEF ID= LIST List output file: must be 132 bytes,
blocked 1. The file must be a sequential
data set. CSD=NO. The file is written
with the first character being a “native”
mode control character for a printer.
//DEF ID= MACLIB Macro library input: the file must be a
partitioned data set, CSD format, 80
byte records, blocked 1.
Lf MACLIB- is. not specified, the default file name is ESYSMACLIB. T and LIST
Niles must always be defined} the OUTPUT and OUTPUT2 files are gptional. DEFINE
tatements may also include keyword parameters to identify the file name or the device
with which the file is associated. |
If the source program is to be read from the card reader, the source program card deck must
be preceded by a //DATA EIL=SYSCRD statement and terminated by a /* card.
11-3
The cards in Figure 11-1 illustrate the Control Language statements to specify:
e Source input from cards
e Relocatable output to a specified library member
e List output to printer
e Cross-reference output
а
Source
Program
/
ий //DATA FIL=SYSCRD
и //PAR OMEM1=PRG2,XREF=YES
(DEF ID>OUTPUT1,FIL=SLIB
(DEF ID=LIST,DEV=PRINTER
7 //DEF ID=INPUT,DEV=SYSCRD
/ EXEC PGM=ASM
Figure 11-1. Example of Cc | Language Statements
The cards in Figure 11-2 illustrate the Control Language statements to specify:
e Source input from spooled input file
° Relocatable output to a specified library member
À List output to printer
e Cross-reference output
“
Source
Program
(—
( //DATA FIL=name
(7 ПРАВ OMEM1=PRG2 XREF=YES
(/ IIDEF ID-OUTPUTI,FIL-SLIB
( I/DEF ID=LIST.DEV-PRINTER
(DEF ID=INPUT FiL=name
/ IJEXEC PGM=ASM
Figure 11-2. Example of Control Language Statements
The cards in Figure 11-3 illustrate the Control Language statements to specify:
e Source input from a library file
e Relocatable output to a specified library member
e List output to printer
e Cross-reference output
(1603
4 //PAR OMEM1=PRG2,XREF=YES
7 //DEF ID=OUTPUT1,FIL=$LIB
(DEF ID=LIST,DEV=PRINTER
4 //DEF {D=INPUT,FIL=MYSOURCEFIL,STA=(P,!}
//EXEC PGM=ASM
Figure 11-3. Example of Control Language Statements
To place the intermediate files on non-shared resource discs, any or all of the cards in Figure
11-4 may be included in the job control stream:
7 //DEF ID=MREL FIL FIL=DUMMY VOL =userpack
7 //DEF ¡D-MRMAGFIL,FIL=DUMMY ,VOL =userpack
4 //DEF ¡D=MASRTFIL,FIL=DUMMY VOL =userpack
7 //DEF ID=MRTEXTO1,FIL=DUMMY ,VOL=userpack
(DEF ID=MRVIRTAL,FIL=DUMMY VOL =userpack
/ //DEF ID=MRXRFFIL,FIL=DUMMY ,VOL=userpack
Figure 11-4. Placing Files on Disk — Example
11-6
The file MRTEXTO1 has the highest traffic and would be the best candidate for
performance enhancement. The file MRXRFFIL is used in macro generation and cross
reference generation programs. The files MRSRTFIL and MRMRGFIL are used for cross
reference. The file MRVIRTAL is used primarily for symbol table overflow. The file
MRELFIL is used for error output.
11-7
A. EBCDIC REPRESENTATION
EBCDIC EBCDIC
Hex Hex
Code | Graphic Card Code Code | Graphic | Card Code
00 NUL 12-0-1-8-9 2F BEL 0-7-8-9
01 SOH 12-1-9 30 12-11-0-1-8-9
02 STX 12-2-9 31 1-9
03 ETX 12-39 32 SYN 2-9
04 PF 12-4-9 33 3-9
05 HT 12-5-9 34 PN 4-9
06 LC 12-6-9 35 RS 5-9
07 DEL 12-7-9 36 UC 6-9
08 12-8-9 37 EOT 7-9
09 12-1-8-9 38 8-9
0A SMM 12-2-8-9 39 1-8-9
ОВ VT — 12-3-8-9 3A 2-8-9
OC FF 12-4-8-9 3B 3-8-9
OD CR 12-5-8-9 3C DC4 4-8-9
OE so 12-6-8-9 3D NAK 5-8-9
OF Si 12-7-8-9 3E 6-8-9
10 DLE 12-11-1-8-9 3F SUB 7-8-9
11 DC1 11-1-9 40 SP No punches
12 DC2 11-2-9 41 12-0-1-9
13 DC3 11-39 42 12-0-2-9
14 RES 11-4-9 43 12-0-3-9
15 NL 11-5-9 44 12-0-4-9
16 BS 11-6-9 45 12-0-5-9
17 IL 11-7-9 46 12-0-6-9
18 CAN 11-8-9 47 12-0-7-9
19 EM 11-1-8-9 48 12-0-8-9
1A CC 11-2-8-9 49 12-1-8
18 11-3-8-9 an | ¢ 12-2-8
1C IFS 11-4-8-9 4B — 12-3-8
1D 165 11-5-8-9 ac < 12-4-8
1E IRS 11-6-8-9 4D ( 12-5-8
1F ITB(IUS) 11-7-8-9 4E + 12-6-8
20 DS 11-0-1-8-9 4F ; 12-7-8
21 sos 0-1-9 50 & 12
22 FS 0-2-9 51 12-11-19
23 0-3-9 52 12-11-2-9
24 BYP 0-4-9 53 12-11-39
25 LF 0-5-9 54 12-11-4-9
26 EOB/ETB | 0-6-9 55 12-11-5-9
27 ESC/PRE 0-7-9 56 12-11-6-9
28 0-8-9 57 12-11-7-9
29 0-1-8-9 58 12-11-8-9
2A SM 0-2-8-9 59 11-1-8
2B 0-3-8-9 5A | 11-2-8
2C 0-4-8-9 58 $ 11-3-8
2D ENQ 0-5-8-9 5C * 11-4-8
2E ACK 0-6-8:9 5D ) 11-5-8
A-1
EBCDIC EBCDIC
Hex Hex
Code | Graphic Card Code Code | Graphic Card Code
5E ; 11-6-8 95 n 12-11-5
5F 11-7-8 96 о 12-11-6
60 - 11 97 p 12-11-7
61 / 0-1 98 q 12-11-8
62 11-0-2-9 99 r 12-11-9
63 11-0-3-9 9A 12-11-2-8
64 11-0-4-9 ЭВ 12-11-3-8
65 11-0-5-9 9C 12-11-4-8
66 11-0-6-9 9D 12-11-5-8
67 11-0-7-9 9E 12-11-6-8
68 11-0-8-9 oF 12-11-7-8
69 0-1-8 АО 11-0-1-8
6A 12-11 A1 11-0-1
6B , 0-3-8 A? S 11-0-2
6C % 0-4-8 A3 t 11-0-3
6D — 0-5-8 A4 u 11-0-4
6E > 0-6-8 Ab у 11-0-5
6F ? 0-7-8 A6 W 11-0-6
70 12-11-0 A7 X 11-0-7
71 12-11-0-1-9 A8 y 11-0-8
72 12-11-0-2-9 A9 Z 11-0-9
73 12-11-0-3-9 AA 11-0-2-8
74 12-11-0-4-9 AB 11-0-3-8
75 12-11-0-5-9 AC . 11-0-4-8
76 12-11-0-6-9 AD 11-0-5-8
77 12-11-0-7-9 AE 11-0-6-8
78 12-11-0-8-9 AF 11-0-7-8
79 1-8 BO 12-11-0-1-8
7A : 2-8 B1 12-11-0-1
7B # 3-8 B2 12-11-0-2
7C @ 4-8 B3 12-11-0-3
7D ' 5-8 B4 12-11-0-4
7E = 6-8 B5 12-11-0-5
7F " 7-8 B6 12-11-0-6
80 12-0-1-8 B7 12-11-0-7
81 a 12-0-1 B8 12-11-0-8
82 b 12-0-2 B9 12-11-0-9
83 с 12-0-3 ВА 12-11-0-2-8
84 d 12-0-4 BB 12-11-0-3-8
85 e 12-0-5 BC 12-11-0-4-8
86 f 12-0-6 BD 12-11-0-5-8
87 g 12-0-7 BE 12-11-0-6-8
88 h 12-0-8 BF 12-11-0-7-8
89 | 12-0-9 CO 12-0
8A 12-0-2-8 C1 A 12-1
8B 12-0-3-8 C2 B 12-2
8C 12-0-4-8 C3 С 12-3
8D 12-0-5-8 C4 D 12-4
8E 12-0-6-8 C5 E 12-5
8F 12-0-7-8 C6 F 12-6
90 12-11-1-8 C7 G 12-7
91 j 12-11-1 C8 H 12-8
92 k 12-11-2 C9 | 12-9
93 | 12-11-3 CA 12-0-2-8-9
94 m 12-11-4 CB 12-0-3-8-9
A-2
EBCDIC EBCDIC
Hex Hex
Code | Graphic Card Code Code| Graphic Card Code
CC 12-0-4-8-9 EG W 0-6
CB 12-0-5-8-9 E7 X 0-7
CE 12-0-6-8-9 ES Y 0-8
CF 12-0-7-8-9 E9 Z 0-9
DO 11-0 EA 11-0-2-8-9
D1 J 11-1 EB 11-0-3-8-9
D2 K 11-2 EC 11-0-4-8-9
D3 L 11-3 ED 11-0-5-8-9
D4 M 11-4 EE 11-0-6-8-9
D5 N 11-5 EF 11-0-7-8-9
D6 O 11-6 FO 0 0
D7 P 11-7 F1 1 1
D8 Q 11-8 F2 2 2
D9 R 11-9 F3 3 3
DA 12-11-2-8-9 F4 4 4
DB 12-11-3-8-9 F5 5 5
DC 12-11-4-8-9 F6 6 6
DD 12-11-5-8-9 F7 7 7
DE 12-11-6-8-9 F8 8 8
DF 12-11-7-8-9 F9 9 9
EO 0-2-8 FA 12-11-0-2-8-9
E1 11-0-1-9 FB 12-11-0-3-8-9
E2 S 0-2 FC 12-11-0-4-8-9
E3 T 0-3 FD 12-11-0-5-8-9
E4 U 0-4 FE 12-11-0-6-8-9
ES V 0-5 FF 12-11-0-7-8-9
B. OBJECT FORMATS OF MACHINE INSTRUCTIONS
The notation used to describe the source and object format in Appendixes A and B is as follows (a =
absolute, r = relocatable expression).
Op Code
R
E
Hexadecimal 00-FF
General register, 0-7. (a)
Extended register, 0-15. (a)
Memory address, 0-65,535. (a or r)
immediate value-arithmetic value, shift count, skip count, or bit number. (a)
Field length, 0-2555 (for MOVL, 0-65,535). (a)
Parentheses enclose index registers and field lengths, both of which are optional.
A bullet following an instruction name indicates the operands are byte-addressable; other
operands are word-addressable only.
Bits 8 and 12 of the object instructions are used in almost every instruction to convey information to the
computer concerning that instruction. If these bits are not interpreted in any way, they are shaded;
otherwise, the following symbols are used to define bits 8 and 12.
1,0
Indirect addressing indicator; for direct addressing i=0, for indirect addressing i=1. Indirect
addressing is indicated by the programmer.
A sub-function indicator; indicates a function that the operation code alone cannot do.
These function bits are set by the assembler.
If bit 8 or 12 must be a 1 or a 0 for a particular instruction, the bit will be shown as a 1 or
0. These bits are set by the assembler; if the wrong bit state appears in the object instruction,
a no-operation occurs.
TWO BYTE INSTRUCTIONS
Op Mnemonic Word/Operand
Code Code Description Format
22 ADDR Add Register-Register
23 SUBR Subtract Register-Register
29 DIVR Divide Register-Register
28 MPYR Multiply Register-Register
25 ANDR Logical Product Register-Register |
26 EORR Exclusive OR Register-Register 7 8 9 11 12 13 15
27 IORR Inclusive OR Register-Register
21 CMPR Compare Register-Register Op Code ! В, ! Ro
20 MOVR Move Register-Register
24 INVR Inverse Move Register-Register Source Operands: OR1,0R>
6F ROFR Reverse Off-Bit
6D RONR Reverse On-Bit
GE TOFR Test for Off-Bit
6C TONR Test for On-Bit
32 ADDI Add Immediate
33 SUBI Subtract Immediate
39 DIVI Divide Immediate
38 MPYI Multiply Immediate
35 ANDI Logical Product Immediate 0 7 8 111213 15
36 EORI Exclusive OR Immediate
37 IORI Inclusive OR Immediate Op Code |, | Ro
31 CMPI Compare Immediate
30 LODI Load Immediate Source Operands: 14,@R9
34 INVI Inverse Move Immediate
F5 INP Input from 1/0 Register
F6 OUT Output to 1/0 Register
0 7 8 9 11 12 13 15
81 INT Convert float to fixed
81 INTT Convert float to fixed Op Code В, f R2
two-word
Source Operands: OR14,Ro
0 7 8 9 11 12 13 15
82 FLT Convert fixed to float : ;
82 FLTT Convert fixed to float Op Code ' В
two-word
Source Operands: OR
B-2
Op Mnemonic
Code Code Description
5F ARDI Arithm. Right Double Shift
Immediate
4F ARSI Arithm. Right Single Shift
Immediate
5C LLDI Logical Left Double Shift
Immediate
4C LLS! Logical Left Single Shift
Immediate
5D LRDI Logical Right Double Shift
Immediate
4D LRSI Logical Right Single Shift
Immediate
5E RLDI Rotating Left Double Shift
Immediate
4E RLSI Rotating Left Single Shift
Immediate
47 SRMB Skip if Register is Minus
Backward
46 SRMF Skip if Register is Minus
Forward
43 SRNB Skip if Register Not Zero
Backward
42 SRNF Skip if Register Not Zero
Forward
45 SRPB Skip if Register is Plus
Backward
44 SRPF Skip if Register is Plus
Forward
41 SRZB Skip if Register is Zero
Backward
40 SRZF Skip if Register is Zero
Forward
3F ARDR Arithm. Right Double Shift
By Register
2F ARSR Arith. Right Single Shift
By Register
3C LLDR Logical Left Double Shift
By Register
2C LLSR Logical Left Single Shift
By Register
3D LRDR Logical Right Double Shift
By Register
2D LASR Logical Right Single Shift
| | By Register
ЗЕ RLDR Rotating Left Double Shift
| By Register
2E RLSR Rotating Left Single Shift
By Register
F2 DIO Disk 1/0
F1 SIO System 1/0
Word/Operand
11 12 13 15
9 11 12 13 15
Format
0 7 8
Op Code 14
Source Operands: 14,Ro
0 7 8
Op Code | В,
Source Operands: @В1,Во
B-3
Op Mnemonic Word/Operands
Code Code Description Format
0 7 8 9 11 12
EB BR Branch to Address in Register
28 CLDR Condition Register Load Op Code | В,
Source Operands: OR1
0 7 8 15
BB SB Skip Unconditional Backward Op Cod |
BA SF Skip Unconditional Forward p Lode 1
Source Operands: |1
48 SCFB Skip on Condition Register
False - Back 0 7 8 11 12 15
49 SCFF Skip on Condition Register
False - Forward | |
4A SCTB Skip on Condition Register Op Code 1 2
True - Back
48 SCTF Skip on Condition Register Source Operands: 14,17
True - Forward
0 7 8 9 15
13 SR Service Request Op Code ; В
Source Operand: Ol
10 RBA Reset Busy/Active Register
10 SBA Set Busy/Active Register 0 7 8 9 11 12 13 15
14 RCN Reset Control Register |
14 SCN Set Control Register Op Code i | Rally f 15
15 RPM Reset Privileged Mode
Register ,
15 SPM Set Privileged Mode Register Source Operands: @Ry,lz or 14.13
0 7 8 11 12 15
12 CTB Clear Tie-Breaker Register =
11 TST Test and Set Tie-Breaker Op Code 14
Register
Source Operand: 14
B-4
Op Mnemonic Word/Operand
Code Code Description Format
0 78 9 11 12 13 15
EF BCM Branch to Control Memory a
F4 WRC Communications Output Op Code
Command
Source Operands: R4y,R9
| 0 | 7 8 11 12 13 15
FO RDX Read Extended Register
FO WRX Write Extended Register | Ор Code Eq f Ro
Source Operands: Eq,R9
0
F3 RDC Communications 1/0
Op Code
80 NEGF Negate Floating Point
Source Operands: none
0 7 8 111213 15
2A CSTR Condition Register Store |.
3A PSTR Program Address Store Op Code ' В,
Source Operand: @R1
FOUR BYTE INSTRUCTIONS
Op Mnemonic
Code Code Description
A2 ADD Add
72 ADDT Add Two-Word
A3 SUB Subtract
73 SUBT Subtract Two-Word
A9 DIV Divide
A8 MPY Multiply
A5 AND Logical Product
A6 EOR Exclusive OR
A7 IOR Inclusive OR
F9 CBY Compare Byte e
A1 CMP Compare
71 CMPT Compare Two-Word
AO LOD Load, Memory -Register
F7 LODB Load Byte Memory-Register e
70 LODT Load Two-Word
FA STO Store Register-Memory
F8 STOB Store Byte Register-Memory e
FB STOT Store Two-Word
A4 INV Inverse Move Memory-Register
E4 BA1 Branch Add 1
ES BA? Branch Add 2
E1 BRN Branch if Register is Not Zero
ЕО BRZ Branch if Register is Zero
E6 BS1 Branch Subtract 1
E7 BS2 Branch Subtract 2
EA BSR Branch and Save Return
EE NOP No Operation
B2 ADDD Add Direct
B3 SUBD Subtract Direct
B9 DIVD Divide Direct
B8 MPYD Multiply Direct
B5 ANDD Logical Product Direct
B6 EORD Exclusive OR Direct
B7 IORD Inclusive OR Direct
B1 CMPD Compare Direct
BO LODD Load Direct
B4 INVD Inverse Move Direct
84 LODF Load floating point
86 ADDF Add floating point
85 SUBF Subtract floating point
88 MPYF Multiply floating point
89 DIVF Divide floating point
Word/Operand
Format
0 7 8 9 11 12 13 15
Op Code i В, i Ro
М,
Source Operands: @My(R4) @R9
0 7 8 9 11 12 13 15
Op Code В, i Ro
Op Code |
15
Source Operands: M1 (R1),Ro
B-6
Op Mnemonic
Code Code
EO BCF
ES BCT
Е2 BOF
E3 BON
AA CVB
AA CVBT
AB CVD
AB CVDT
BF IBIT
BD RBIT
BC SBIT
BE TBIT
ED B
EC BCH
87 CMPF
8A STOF
FE RAR
FE WAR
FF RSAR
FF SAR
FD RRO
FD WRO
Description
Branch on Condition
Register - False
Branch on Condition
Register - True
Branch if Bit is Off
Branch if Bit is On
Convert to Binary e
Convert to Binary
Two-Word o
Convert to Decimal e
Convert to Decimal
Two-Word e
Invert Bit e
Reset Bit e
Set Bit e
Test Bit e
Branch-Post Indexing
Branch-Pre Indexing
Compare floating point
Store floating point
Read Any Register
Write Any Register
Restore All Registers
Save All Registers
Read Register Options
Write Register Options
Word/Operand
Format
0 7 8 9 11 12 15
Op Code i В, lo
M4
Source Operands: @My(R4).l9
0 78 9 11 12 13 15
Op Code В, f Ro
My
Source Operands: OM (R14),Ro
0 | 7 8 9 11 12 13 15
Op Code i | Ry 11 lo
M4
Source Operands: OM (R1),l5
0 78 9 11 12 15
Op Code i | Ry
M4
Source Operands: @My(R4)
0 72 8 9 11 12 13 15
Op Code f В, Ro
14
Source Operands: 11(R1),@R5
SIX BYTE INSTRUCTIONS
Op Mnemonic
Code Code
62 ADDM
63 SUBM
69 DIVM
68 MPYM
65 ANDM
66 EORM
67 [ORM
68 CBYM
61 CMPM
6A MOVB
60 MOVM
64 INVM
3B SHFK
Description
Add Memory-Memory
Subtract Memory-Memory
Divide Memory-Memory
Multiply Memory-Memory
Logical Product Memory-
Memory
Exclusive OR Memory-
Memory
Inclusive OR Memory-
Memory
Compare Byte Memory-
Memory e
Compare Memory -Memory
Move Byte Memory-Memory e
Move Word Memory-Memory
Inverse Move Memory-
Memory
Shift Packed Decimal e
Word/Operand
Format
0 7 8 9 11 12 13 15
Op Code В, | Ro
My
Mo
Source Operands: @My(R,) @My(R 9)
Source Operands: My(L4,R4).l9(R2)
B-8
EIGHT BYTE INSTRUCTIONS
Op Mnemonic Word/Operand
Code Code Description Format
52 ADDK Add Packed Decimal e
53 SUBK Subtract Packed Decimal e 0
51 CMPK Compare Packed Decimal e |
55 CMPX Compare Characters e | - Op Code
54 MOVX Move Characters e
58 PAKX Pack e
59 UNPX Unpack @
50 ZADK Zero and Add Decimal e т
57 EDTX Packed Decimal/Alpha 1
Edit e
7C DIVK Divide Packed Decimal o Source Operands:
BB MPYK Multiply Packed Decimal e
0 7 8 9 11 12 13 15
56 TRNX Translate e
Source Operands: M4(R4),M9(L9,R9)
0 7 8 9 11 12 13 15
Op Code |
5A MOVL Move Long e
Source Operands: M4 (L4,R1),Mo(Ro)
C. ALPHABETICAL LIST OF MNEMONICS
This appendix lists all machine mnemonic codes and extended mnemonic codes in alphabetical order. Also
included are the hexadecimal function codes, the instruction size in bytes, and the configuration of the
source operand. An asterisk in the function code column indicates an extended mnemonic code. The
symbols used in the operand configuration are the same as in the preceding lists.
Mnemonic — Operation Instruction
Code _ Code _ Size (Bytes) Operand Configuration
ADD A? 4 @M4(R4),@R»
ADDD B2 4 14(R4),@R9
ADDF 86 4 @M4(R41),Ro
ADDI 32 2 |, @R2
ADDK — 52 8 My(L4,R4),Ma(La,R2)
ADDM 62 6 @My(R4),@Ma(R9)
ADDR 22 2 @R1,@R»
ADDT 72 4 @M4(R4),@R»
AND A5 4 EM (R1),ER>
ANDD B5 4 11(R1),@R5
AND! 35 2 11,0R>
ANDM 65 6 — EM (R1),GMI(R>)
ANDR 25 2 @R,@R5
ARDI БЕ ` 2 14,R>
ARDR 3F 2 @В | В)
ARSI 4F 2 14,Ro
ARSR 2F 2 ER ,Ro
B ED 4 @My(R4)
BA1 E4 4 @My(R4),@R9
BA2 ES 4 @М (R1),ER9
BBR * @My(R1)
BBS EM (R1)
BCF E9 4 @M4(R4),12
BCH EC 4 OM (В, )
BCM EF 2 Rı,Ro
BCT E8 4 EM (R1).lo
BCY * OM (R1)
BEQ * @M 4 (R 4)
BGE * EM (R1)
BGT * @M4(Rı)
BID * GA
BKM # @M4(R4)
BKP " @My(R1)
BKZ * @M4(R4)
BLE * | EM (R1)
BLEQ a EM (R1)
BLGE * @My(R41)
C-1
Mnemonic Operation Instruction
Code | Code Size (Bytes) Operand Configuration
BLGT * | @My(R4)
BLLE * @My(R4)
BLLT * | @My(R4)
BLNE * EM (R1)
BLT * . GM (R1)
BNC * @My(R1)
BNE * @M4(R4)
BNI * OM (R1)
BNV * OM (R1)
BOF E2 4 @M4(R4), 125
BON E3 4 @M¢(Rq).19
BOV * EM (R1)
BR EB 2 GR
BRN E1 4 @My(R4) @R9
BRZ EO 4 @М (R4),EGR>5
BS1 E6 4 @My(R4),@R9
BS2 E7 4 OM (R1),OR>
BSR EA 4 — EM (R1),ER9
CBY F9 4 @M4(R4),@R»
CBYM 6B 6 @M+4(R41),@M»(R>»)
CLDR 2B 2 OR
CMP A1 4 OM (R1),ER5
CMPD B1 4 14(R1),OR>
CMPF 87 4 OM (R1)
CMPI 31 2 1,,@R9
CMPK 51 8 My(L4,R4),M4(La,R9)
CMPM 61 6 @My(R4y) @M9(R2)
CMPR 21 2 @R,,@R9
CMPT 71 4 @M4(R4),@R»
CMPX 55 8 M4(L4,R4),M2(L2,Ro)
CSTR 2A 2 OR |
CTB 12 2 H
CVB AA 4 @My(R4),R9
CVBT | AA 4 @My(R4),R9
CVD AB 4 @My(R1),R9
CVDT AB 4 @My(R4),R9
DIO F2 2 OR 1,Ro
DIV A9 4 @M1(R1) @R9
DIVD B9 4 11(R4),@R9
DIVF 89 4 @My(R4),R9
DIVI 39 2 14,@R»
C-2
Mnemonic Operation — Instruction
Code | Code | Size (Bytes) Operand Configuration
DIVK 7C 8 My(L4,R4),Mo(L9,R9)
DIVM 69 6 @My(R4) @M9(R9)
DIVR 29 2 @R1,@R2
EDTX 57 8 Mi(L4,R4),Mo(Lo,Ro)
EOR A6 4 @My(R1),@R7
EORD B6 4 11(R1),OR2
EORI 36 2 11,0R>
EORM 66 6 EM (8 ),@М2(Вэ)
EORR 26 2 OR 1,OR>5
FLT/FLTT 82 2 ER,
IBIT BF 4 @M4(R4),12
INP F5 2 1,,@R9
INT/INTT 81 2 @R1,R9
INV Ad 4 @M1(R4),@R»
INVD B4 4 11(R1),@R5
INVI 34 2 11,@R9
INVM 64 6 EM (R1),EM2(R2)
INVR 24 2 | OR 1,OR»
IOR AT 4 EM; (R1),ER,
IORD — B7 4 11(R1),ER?
IORI 37 2 — 11,0R9
IORM 67 6 @My(R1),@Ma(R9)
IORR 27 2 @R1,@R9
LLDI BC 2 14,Ro
LLDR 3C 2 @R4,Ro
LLSI 4C 2 11,Ro
LLSR 2C 2 @R4,Ro
LOD AO 4 EM (R1),ER>
LODB F7 4 @M4(R4),@R»
LODD BO 4 11(Rq),@R5
LODF 84 4 EM (R1),Ro
LODI 30 2 14,@Ro
LODT 70 4 @M4(R4),@R»
LRDI 5D 2 14,R2
LRDR 3D 2 — GR1,R
LRSI | 4D 2 14,Ro
LRSR 2D 2 @R4,Ro
MOVB 6A 6 @M4(R4),@M2(Ro)
MOVL 5A 8 My (L4.R1),M9(R9)
MOVM 60 6 @My(R4),@M9(R2)
MOVR 20 Ш @В |, @В,
C3
Mnemonic
Code
MOV X
MPY
MPYD
MPYF
MPYI
MPYK
MPYM
MPYR
NEGF
NOP
OUT
PAKX
PSTR
RAR
RBA
RBIT
RCN
RDC
RDX
RLDI
RLDR
RLSI
RLSR
ROFR
RONR
RPM
RRO
RSAR
S
SAR
SB
SBA
SBIT
SBR
SBS
SCF
SCFB
SCFF
SCN
SCT
SCTB
Operation
Code
54
AS
B8
88
38
5B
68
28
80
EE
F6
58
3A
FE
10
BD
14
F3
FO
5E
3E
4E
2E
6F
6D
15
FD
FF
FF
BB
10
BC
+
*
+
4B
49
14
*
4A
Instruction
Size (Bytes)
C4
> N N +
Operand Configuration
BE RA NNN NNNNMNDNDNMNNBNBABNMNONMBAENNMOOONSD в + с
M4 (L4,R4),M9(L9,R29)
@My(R1),@R9
14 (R4),ER>
OM 1 (R4),Ro
11,@R9
M4(Ly,R4),M9(L9,R9)
@My,(R,) @M9(R9)
OR 1,OR5
blank
blank or @M4(R4),@R»
14,@R»
M4(L4,R4),Mo(Lo,Ro)
GR y |
M4(R4) @R9
OR 4,19 or 14,19
@My(R1),19
OR 4,19 or 4,19
Es, Ro
14,R>
@R1,R9
14,R>
OR 4,Ro
OR 1,OR>
ER 1,OR
GR 1,19 or 11,19
M4 (R1),OR>
M1(R1).@R3
My or 14
Mi (R1),ER>
hh
GR 1,19 or 14,12
@M1(Rq),lo
My or 14
М ог |
M4,19 or 14.19
14,15
11.12
OR 1,19 or 14,19
My ,19 or 14,19
11.12
Mnemonic
Code
SCTF
SCY
SEQ
SF
SGE
SGT
SHFK
SID
$10
SKM
SKP
SKZ
SLE
SLEQ
SLGE
SLGT
SLLE
SLLT
SLNE
SLT
SNC
SNE
SNI
SNV
SOV
SPM
SR
SRM
SRMB
SRMF
SRN
SRNB
SRNF
SRP
SRPB
SRPF
SRZ
SRZB
SRZF
STO
STOB
Operation Instruction
_ Code Size (Bytes)
48 2
*
*
ВА 2
+
*
3B 6
*
F1 2
+
*
+
"e
*
E
*
e
e
*
+
e
15
13
*
47
46
A
43 2
42 2
de
45 2
44 2
“e
41 2
40 2
FA 4
F8 4
C-5
Operand Configuration
14,19
M4 or |,
M4 or 14
1
M4 or |4
M1 or 14
M4(L4,R4),12(Ro)
M4 or 14
@R1,R»
M4 or {4
M4 or 14
M4 or l
My or |4
My or ly
My or |4
My or |4
M4 or |4
M4 or |4
M4 or |4
My or |4
M4 or 14
M4 or 14
My or |4
My or |4
M4 or 14
@Ry,19 or 14,19
Ol y
M1,Ro9 or l4,Ro
‚Во
11.R2
M4,R9 or 14,19
11.12
11.R2
M4,Ro or 14,19
11.R2
11.2
M4,R9 or 14,15
11.R2
‚Во
@My(R1),@R9
EM (R4),ER>
Mnemonic Operation Instruction
Code Code Size (Bytes) Operand Configuration
STOF 8A 4 EM; (R1)
STOT FB 4 EM; (R1),ER2
SUB A3 4 EM (R1),OR,
SUBD B3 4 [1 (R4) @R9
SUBF 85 4 @My(R4),R9
SUBI 33 2 11 @R2
SUBK 53 8 M4(L4,R4),M2(L2,Ro)
SUBM 63 6 @M4(R4),@M2(Ro)
SUBR 23 2 @R,,@R9
SUBT 73 4 @My(R4),@R
TBIT BE 4 @M4(R4),12
TOFR 6E 2 @R1,@R9
TONR 6C 2 @R1,@R,
TRNX 56 8 M4 (R4),Mo(Lo,Ro)
TST 11 2 р
UNPX 59 8 M4 (L4,R1), Ma(L9,R9)
WAR FE 4 Mi (R1),ER2
WRC F4 2 R1,Ro
WRO FD 4 Mi (R1).OR9
WRX FO 2 E4,R9
ZADK 50 8 My(Ly,R4),M9(La,R9)
C-6
D. HEX CODE TO MNEMONIC CODE
10
11
12
13
14
15
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F
30
31
32
33
34
35
36
37
38
39
3A
ЗВ
3C
3D
3E
3F
40
41
SBA/RBA
TST
CTB
SR
SEN/RCN
SPM/RPM
MOVR
CMPR
ADDR
SUBR
INVR
ANDR
EORR
IORR
MPYR
DIVR
CSTR
CLDR
LLSR
LRSR
-RLSR
ARSR
LODI
CMPI
ADDI
SUBI
INVI
ANDI
EORI
IORI
MPYI
ОГ!
PSTR
SHFK
LLDR
LRDR
RLDR
ARDR
SRZF
SRZB
42
- 43
44
45
46
47
48
49
4A
4B
AC
4D
4E
4F
50
51.
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F
60
61
62
63
64
65
66
67
68
69
SRNF
SRNB
SRPF
SRPB
SRMF
SRMB
SCTF
SCFF
SCTB
SCFB
LLSI
LRSI
RLS!
ARSI
ZADK
CMPK
ADDK
SUBK
MOV X
CMPX
TRNX
EDTX
PAKX
UNPX
MOVL
MPYK
LLDI
LRDI
RLDI
ARDI
MOVM
CMPM
ADDM
SUBM
INVM
ANDM
EORM
IORM
MPYM
DIVM
6A
6B
6C
6D
6E
6F
70
71
72
73
7C
80
81
82
84
85
86
87
88
89
BA
AQ
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
BO
B1
B2
B3
B4
Bb
B6
MOVB
CBYM
TONR
RONR
TOFR
ROFR
LODT
CMPT
ADDT
SUBT
DIVK
NEGF
INT/INTT
FLT/FLTT
LODF
SUBF
ADDF
CMPF
MPYF
DIVF
STOF
LOD
CMP
ADD
SUB
INV
AND
EOR
IOR
MPY
DIV
CVB/CVBT
CVD/CVDT
LODD
CMPD
ADDD
SUBD
INVD
ANDD
EORD
B7
B8
B9
BA
BB
BC
BD
BE
BF
EO
E1
E2
E3
E4
ЕБ
E6
E7
ES
E9
EA
EB
EC
ED
EE
EF
FO
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA
FB
FD
FE
FF
IORD
MPYD
DIVD
SF
SB
SBIT
RBIT
TBIT
IBIT
BRZ
BRN
BOF
BON
BA1
BA2
BS1
BS2
BCT
BCF
BSR
BR
BCH
B
NOP
BCM
RDX/WRX
SIO
DIO
RDC
WRC
INP
OUT
LODB
STOB
CBY
STO
STOT
RRO/WRO
RAR/WAR
SAR/RSAR
D-1
E. SUMMARY OF ASSEMBLER STATEMENTS
Name Operation Operand
Sequence symbol, set symbol, ADO Arithmetic set expression,
or blank sequence symbol
Sequence symbol or blank AGO Sequence symbol
Symbol or blank ALIGN Absolute, resolved arithmetic
expression
Sequence symbol ANOP Not used — ignored by the
assembler
Symbol or blank BDD One or more operands
separated by commas
Symbol or blank BRS Absolute, arithmetic
expression
Symbol or blank COM Not used — ignored by the
assembler
Symbol or blank CSECT Not used — ignored by the
assembler
Sequence symbol or blank EJECT Not used — ignored by the
| assembler
Blank END Ordinary symbol or blank
Sequence symbol or blank ENTRY One or more relocatable symbols
separated by a comma
Ordinary or variable symbol EQU Expression
Seguence symbol or blank EXTRN One or more relocatable symbols
separated by a comma
Ordinary symbol FORM One or more positive arithmetic
| expressions separated by commas
Symbol or blank Form name Exp,exp,. . .,exp
Blank GBLA 1-35 set symbols separated by
| commas
Blank GBLC 1-35 set symbols separated by
commas
Blank ICTL Two decimal arithmetic constants
separated by a comma
E-1
Name Operation Operand
Blank ISEQ Blank, or two decimal arithmetic
constants separated by a comma
Symbol or blank LTORG Not used
Blank MACRO Not used — ignored by the
assembler
Sequence symbol or blank MEND Not used — ignored by the
assembler
Sequence symbol or blank MEXIT Not used — ignored by the
assembler
Seguence symbol or blank MNOTE Severity code, message or
message only
Seguence symbol or blank ORG Relocatable expression or blank
Sequence symbol or blank PRINT One-to-four operands separated
by commas
Sequence symbol or blank PUNCH Not used
Set symbol SETA Arithmetic set expression
Set Symbol SETC Character term or arithmetic
set expression
Sequence symbol or blank SPACE Absolute arithmetic expression
Symbol or blank TITLE Character string constant
Symbol or blank WDD One or more operands separated
by commas
Symbol or blank WRS Absolute arithmetic expression
E-2
F. MACRO EXAMPLE
The example in Figures F-1 through F-3 demonstrates the use of the FORM instruction, but
may serve as a model for many macro language and conditional features. It shows the
comprehensive definition for a system macro, and two MACRO instructions for that macro.
Two are included because the definition generates some code unique to the first call.
The formal parameter list of the definition identifies expected parameters from the call:
IDENT, LABDEF, REWIND, USAGE, CONTROL, and LIST. Three of these (REWIND,
USAGE, and CONTROL) have default values provided in the definition. The other three
remain null in value, if the call does not provide an explicit value for them.
By using relational expressions in SETA statements, the macro definition provides for the
setting of many counters according to the parameter values provided. Hence, the first call in
the example, whose parameter string is: IDENT=FILE1,USAGE=O, sets the counter &UO
(line 00039) because USAGE=0 was coded.
Because of the default value YES for REWIND, counter &RY (line 00042) is also set. The
default ANS for CONTROL sets counter &CCA (line 00045). Conversely, counters &LY
(line 00021), &LN (line 00025), and &LB (line 00037) are zero, because the LABDEF and
LIST parameters were not given values by the macro call.
Note how the definition explicitly checks for failure to provide the IDENT parameter (lines
00048-00053). If the user does not provide it in the call, its count is zero (K'&IDENT),
&IDNO is set to 1, and the ADO statement (line 00050) generates the fatal MNOTE
message. In the call examples, IDENT=FILE1, the count (K’&IDENT) is 5 and &IDNO is
not set. By similar means, the definition checks to ensure that specifications for the other
parameters are correct.
When all the incoming parameter values are verified and the appropriate conditional
counters are set or reset, the macro generates the 1/0 packet with a FORM statement to
designate the principal options.
In line 00003, the macro declares the count field (&DMOCCNT) as global, and tests it for a
zero (default) value. If it is zero, line 00005 sets it to 1. In this way, the macro determines
whether the call is the first call within the assembly. This allows the once-only definition of
the FORM instruction: $DMF RM, consisting of eight one-bit fields (line 00007). (Also note
the use of the same code to generate an external for $DMOCC (line 00006), an external
subroutine.)
The FORM reference is generated through the $F1 SETC (line 00069), which creates the
character string SDMFRM to be used at line 00072. In the operand fields of the FORM
reference, SETA references pick up the counters established by earlier conditional
instructions. |
In the first call shown, USAGE=0 sets &UO=1 and REWIND=YES (default) sets SRY=1.
Since the operand string of the &F1 statement was &CCN,0,0,0,&V0,&VV,&RY,&LB, the
$DMFRM generates 0,0,0,0,1,0,1,0 as shown in the call expansion. In the second call,
USAGE=U sets &UV=1, REWIND=YES (default) sets & RY=1, and the $DMF RM generates
0,0,0,0,0,1,1,0. |
PRINT FUNCTION: DATE=72304 TIME=074604.
OPENL MAC LISTING
00001 MACRO
00002 &TAG OPENL
00003 GBLA &DMOCCNT
00004 ADO &DMOCCNT < EQ > 0, .DMOPIO
00005 &DMOCCNT SETA 1
00006 EXTRN &DMOCC
00007 &DMFRM FORM 1,1,1,1,1,1,1,1
00008 .DMOPIO ANOP |
00009 ADO K'&TAG <EQ>0, .DMOP15
00010 &TAGH SETC C'DM'
00011 &ТС SETC &SYSNDX
00012 AGO .DMOP25
00013 .DMOP15 ANOP
00014 &TG SETC с’,
00015 АРО K'& TAG < LE >6, .DMOP20
00016 ETAGI SETC &TAG
00017 | AGO .DMOP25
00018 .DMOP20 ANOP
00019 &TAG! SETC &TAG(1,6)
00020 .DMOP25 ANOP
00021 &LY SETA &LIST <EQ>C'YES"
00022 ADO &LY,.DMOP30
00023 AGO .DMOP50
00024 .DMOP30 ANOP
00025 SLN SETA &LIST< EQ >C'NO’
00026 &TAG LODD OPED&SYSNDX,@7
00027 ADO &LN, .DMOP40
00028 BCH @$DMOCC
00029 AGO MEXIT
00030 .DMOP40 ANOP
00031 BSR @$DMOCC,6
00032 AGO .DMOP55
00033 1DMOP50 ANOP
00034 &TAG ALIGN 2
00035 .DMOP55 ANOP
&IDENT=,&LABDE F=,&R EWIND=YES,&USAGE=1,&CONTROL=ANS &LIST=
Figure F-1. Macro Definition
F-2
SET GLOBAL FORM
AND EXTERNAL
FIRST TIME
SET 6 BYTE
TAG FOR LABEL
PREFIX ON FIELDS OF
THE LIST
LIST=YES
LIST=NO OR OMITTED
SET RETURN INTO SAVE AREA
REG 6 ALREADY POINTS TO PACKET
SET REG 6 AT PACKET
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
* CHANGE MADE PER PTR 333 06/16/72 DJS
&LB
&UI
&UO
&UU
&USG
&RY
&RN
&REW
&CCA
&CCN
&CNTRL
&IDNO
&ERR
&ERR
.DMOP60
&ERR
.DMOP65
&ERR
.DMOP70
&ERR
.DMOP73
.DMOP75
&F1
&TAGI.BT&TG &F1
&TAG1.ER&TG WDD
&TAG1.BD&TG WDD
SETA
SETA
SETA
SETA
SETA
SETA
SETA
SETA
SETA
SETA
SETA
SETA
SETA
ADO
MNOTE
SETA
ANOP
ADO
MNOTE
SETA
ANOP
ADO
MNOTE
SETA
ANOP
ADO
MNOTE
SETA
ANOP
ADO
AGO
ANOP
SFTC
WDD
BDD
BDD
BDD
BDD
BDD
ADO
K'&LABDEF <GE> 1 SET COUNTERS
&USAGE<EQ>C'T’ DEPENDING
&USAGE <EQ>C'0" ON
&USAGE<EQ>C'V’ KEYWORD
&UI+&UO+&UU NE 1 SPECIFICATIONS
&REWIND<EQ>C'YES"
&REWIND<EQ>C'NO"
&RY+E&ERN<NE >1
&CONTROL<EQ>C'ANS"
&CONTROL<EQ>C'NATIVE"
&CCA+BCCN<NE>1
K'&IDENT<LT>1
0
&IDNO, .DMOPGO
F,***IDENT KEYWORD MISSING ***
1
FATAL IF IDENT MISSING
&USG, .DMOP65
F,***USAGE=&USAGE INCORRECT SPECIFICATION***
1
&REW, .DMOP70
F,***REWIND=8&REWIND INCORRECT SPECIFICATION **#
1
&CNTRL, .DMOP73
F,***CONTROL=&CONTROL INCORRECT SPECIFICATION***
1
&ERR, .DMOP75
MEXIT
C'&DMERM' | |
“7 LENGTH OF PACKET (WORDS)
s'04' OPEN
&CCN,0,0,0,&U0,&UU,&RY,&LB OPTION BITS |
“0 ERROR RETURNED HERE
X00’ N/A
&SYSEG SEGMENT TAG
&IDENT PIR TO BOT
х’00' N/A
&SYSEG SEGMENT TAG
&LB, .DMOP80 LABEL PARAMETER
**** CHANGE 06/21/72 PIR 4351 DJS
&TAG1.LB&TG WDD &LABDEF
.DMOP80
AGO
ANOP
MEXIT
***% CHANGE 06/21/72 PTR 4351 DJS
&TAG1.LB&TG WDD
MEXIT
OPED&SYSNDX EQU *
ANOP
MEND
“0
CODED
RETURN HERE
LBINOO10 LIBRARY FUNCTION COMPLETE
Figure F-1. Macro Definition (Continued)
052E
0532
0536
0538
0539
053A
053C
053D
053E
0540
0541
0542
05A4
05A8
OBAC
OSAE
O5AF
05B0
05B2
0583
05B4
0586
0587
C5B8
BOOF0544
EAS60000
0007
04
0A
0000
00
00
0082
00
00
0000
0544
BOOFOSBA
EA860000
0007
04
06
0000
00
00
0082
00
00
0000
05BA
0224
0227A
0228A
0239A
0242A
0245A
0270A
0271A
0272A
027 3A
0274A
0275A
0276A
0277A
0278A
0281A
0282A
0284A
0408
0420A
0423A
0426A
0451A
0452A
0453A
0454A
0455A
0456A
0457A
0458A
0459A
0462A
0463A
0465A
$DMFRM
OPENL
EXTRN
FORM
LODD
BSR
IDENT=FILE1 USAGE=0
&DMOCC
11111111
OPED0O002 @7
@$DMOCC 6
* CHANGE MADE PER PTR 333 06/16/72 DJS
DMBT0002
DMER0002
DMBD0002
WDD
BDD
&DMFRM
WDD
BDD
BDD
WDD
BDD
BDD
pa
х'04'
0,0,0,0,1,0,1,0
“О
х'00'
$SYSEG
FILE1
х'00'
$SYSEG
**** CHANGE 06/21/72 PTR 351 DJS
DMLBO0002
OPEDO002
Figure F-2. Macro Instruction and Expansion (Cail 1)
WDD
EQU
OPENL
LODD
BSR
“0
*
IDENT=FILE1,USAGE=U
OPED0005,*7
@$DMOCC,6
* CHANGE MADE PER PTR 333 06/16/72 DJS
DMBT0005
DMERO005
DMBD0005
WDD
BDD
&DMFRM
WDD
BDD
BDD
WDD
BDD
BDD
у
х'04'
0,0,0,0,0,1,1,0
0
X00"
$SYSEG
FILE?
X00’
$SYSEG
**** CHANGE 06/21/72 PTR 351 DJS
DMLBO005
OPED0005
Figure F-3. Macro Instruction and Expansion (Call 2)
WDD
EQU
“0
*
FIRST TIME
SET RETURN INTO SAVE AREA
SET REG 6 AT PACKET
LENGTH OF PACKET (WORDS)
OPEN
OPTION BITS
ERROR RETURNED HERE
N/A
SEGMENT TAG
PTR to BDT
N/A
SEGMENT TAG
RETURN HERE
SET RETURN INTO SAVE AREA
SET REG 6 AT PACKET
LENGTH OF PACKET (WORDS)
OPEN
OPTION BITS
ERROR RETURNED HERE
N/A
SEGMENT TAG
PTR TO BDT
N/A
SEGMENT TAG
RETURN HERE
G. ASSEMBLER ERROR MESSAGES
The Assembler issues two types of errors. They are source error diagnostic messages and
source error abort messages. Also listed in this section are the system messages that cause
the Assembler to abort.
ASSEMBLER SOURCE ERROR DIAGNOSTIC MESSAGES
The assembler source errors are printed at the end of the listing.
The messages have the following format:
LINE ERROR ERROR
NUMBER TYPE CODE MESSAGE TEXT
nnnn t aappnnn text * insert * text
where:
nnnn is a 4-digit decimal number that refers to the line in the
source listing where the error occurred.
t is either W designating the error as warning or F desig-
nating the error as fatal.
aappnnn is a 7-character error code where aa is always AS
specifying the Assembler as the source of the error,
pp is a 2-digit decimal number indicating the pass of
the Assembler during which the error occurred, and
nnn is a 3-digit decimal number specifying the error
within the pass.
text * insert « text is the text of the message. If the text contains an insert,
an asterisk precedes and follows the insert. An insert
contains the erroneous character and all characters back
to the beginning of the invalid term. For example, if
the listing contains an invalid variable symbol, such as
&8PAM, the insert will contain the characters &8.
The error messages and their explanations follow.
G-1
LINE
NUMBER
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
ERROR
TYPE
F
ERROR
CODE
AS02001
AS02002
AS02003
AS02004
AS02005
AS02006
AS02007
AS02008
AS02009
AS02010
AS02011
AS02012
AS02013
G-2
MESSAGE TEXT
OPERAND SIZE OR NUMBER OF TERMS
EXCEEDS MAXIMUM.
This message indicates internal stack overflow.
To correct the condition, reduce the number
of terms in the expression or number of
operands.
UNMATCHED RIGHT PARENTHESIS.
UNMATCHED LEFT PARENTHESIS.
EXPRESSION OR SUBLIST CONTAINS AN
INVALID COMMA.
INVALID SYNTAX =. . .insert. . .x
An invalid element or combination of
elements appear.
INVALID USE OF INDIRECTION.
*. . Insert. . .*
The use of the indirect operator, @, is
invalid.
INVALID EXPRESSION +. . .insert. . .+
The syntax does not follow the rules for
coding expressions.
INVALID USE OF LITERALS +*.. .insert. . .*
The use of the literal operator, =, is invalid
in this statement.
INVALID USE OF PARENTHESIS
*, . Insert. . .*
CHARACTER STRING INVALID WITH
+ - * OR / OPERATOR «=. . .insert. . .*
Arithmetic operations are invalid with strings.
INVALID SUBLIST +*.. .insert. . .+
The use of the sublist is invalid in this
statement.
RELOCATABLE TERM USED IN MULTI-
PLICATION, DIVISION OR LOGICAL
OPERATION +*.. .insert. . .+
The location counter, *, may not enter into
the above mentioned operations.
MAY NOT FOLLOW A LOGICAL, RELA-
TIONAL OR ARITHMETIC OPERATOR
*, . insert. . .*
The unary operator NOT may not follow
the above mentioned operators.
LINE ERROR ERROR
NUMBER TYPE CODE | MESSAGE TEXT
NOTE: AS02014 and AS02015 are reserved for future use.
nnnn F AS02016 SYMBOL TOO LONG =. . .insert. . .*
The name entry or a symbolic operand
may not exceed 8 characters.
nnnn F AS02017 INVALID HEXADECIMAL CONSTANT
*, . insert. . .*
A hexadecimal constant may only contain
digits 0-9 and characters A-F.
nnnn F AS02018 OPERAND SIZE OR NUMBER OF TERMS
EXCEEDS MAXIMUM =, . insert. . .*
This message indicates internal stack over-
flow. To correct the condition, reduce the
number of terms in the expression or the
number of operands.
nnn Foo AS02019 | INVALID OPERATOR =. . ‚insert. . .*
The operator or symbol is not in the
language.
nnnn F AS02020 INVALID CHARACTER *.. .insert. . .+
‘The character is not in the language or is
contextually incorrect.
nnnn F AS02021 INVALID CONTINUATION =. . .insert. . .*
| The usage of the semicolon is contextually
invalid.
nnnn F AS02022 INVALID SYMBOL =. . .insert. . .*
The length attribute operand may only be
symbolic. В о
nnnn | F AS02023 INVALID STRING =, . ‚insert. . .*
An invalid string structure appeared.
NOTE: AS02024 is reserved for future use.
nnnn F AS02025 INVALID STRING =*.. .insert. . .»
Same as AS02023 above.
nnnn W AS02026 OPERAND TRUNCATED — TOO LONG
*. . insert. . .*
The number of digits exceeds the maximum
allowed. For a decimal integer, 5 is the maxi-
mum. For an integer string, 10 is the maxi-
mum. For a hexadecimal constant, 4 is the
maximum.
nnnn W AS02027 VALUE TRUNCATED — EXCEEDS PER-
MISSIBLE MAGNITUDE +*.. .insert. . .*
A decimal integer may not exceed 65,535.
An integer string may not exceed 268,435,455.
G-3
LINE
NUMBER
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
- nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
ERROR
TYPE
F
ERROR
CODE
AS02028
AS02029
AS02030
AS02031
AS02032
AS02033
AS02034
AS02035
AS02036
AS02037
AS02038
AS02039
AS02040
AS02041
G-4
MESSAGE TEXT
OPERAND ENTRY MISSING.
The operation code in this statement
requires an operand field entry.
CONTINUATION LINE IS BLANK.
TOO MANY CONTINUATION STATEMENTS.
In a normal statement, only one continued
statement is allowed.
VARIABLE SYMBOL MUST START WITH &
FOLLOWED ВУ А-2 ОВ $.
LEFT PARENTHESIS MAY NOT BE
IMMEDIATELY PRECEDED BY A
VARIABLE SYMBOL.
VARIABLE SYMBOL MUST START WITH &
FOLLOWED BY A-Z OR §.
VARIABLE SYMBOL TOO LONG.
The variable symbol is greater than 7 characters
excluding the ampersand sign.
.* COMMENT VALID ONLY WITH A MACRO.
CHARACTER THAT FOLLOWS . OR & MUST
ВЕ А-2 ОВ $.
Period or & is followed by a numeric or an
illegal character in the name field.
NAME ENTRY TOO LONG.
In an ordinary symbol, only 8 characters are
allowed and in a sequence or variable symbol
only 7 characters are allowed.
INVALID CHARACTER IN NAME ENTRY.
Only characters allowed are A-Z, 0-9 and $.
For a sequence or variable symbol, the first
character must be . or & respectively.
OPERATION ENTRY MISSING.
An operation entry is required in every state-
ment.
NAME ENTRY CANNOT BE CONTINUED.
NAME ENTRY MUST BE FOLLOWED BY A
SPACE.
The space is the delimiter of each field in the
MRX Assembler.
LINE
NUMBER
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
ERROR
TYPE
F
ERROR
_CODE_
AS02042
AS02043
AS02044
AS02045
AS02046
AS02047
AS02048
AS02049
AS02051
MESSAGE TEXT
OPERATION ENTRY MUST BE FOLLOWED
BY A SPACE.
The space is the delimiter of each field in the
MRX Assembler.
OPERATION CODE CANNOT BE CONTINUED.
INVALID CHARACTER IN OPERATION
ENTRY.
Only valid characters are A-Z, 0-9, & and $.
OPERATION ENTRY TOO LONG.
Only 8 characters are allowed if there is no
substitution in the operation entry.
INVALID ISEQ PARAMETERS — COMMAND
IGNORED.
1. The parameter value is within the begin
and end limits in the statement.
2. The length of the sequence field is zero.
3. The length of the sequence field is greater
than 8 characters.
MISPLACED ICTL STATEMENT.
An ICTL statement must be the first statement
of an assembly.
STATEMENT VALID ONLY WITHIN A
MACRO.
The following operation codes are allowed
within a macro definition:
GBLA
GBLC
MACRO
MEND
MNOTE
MEXIT
INVALID OR MISPLACED INSTRUCTION IN
MACRO DEFINITION.
The following operation codes are not allowed
within a macro definition: |
PRINT
ISEQ
MACRO
Also GBLA, GBLC must immediately follow the
macro definition prototype.
INVALID CONTINUATION.
The continued statement has a continuation
character as the first nonblank character.
LINE
NUMBER
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
АПЛ
nnnn
nnnn
nnnn
ERROR
TYPE
W
W
ERROR
CODE
AS02052
AS02053
AS02054
AS02055
AS02056
AS02057
AS02058
AS02059
AS02060
AS02061
AS02062
AS02063
AS02064
AS02065
AS02066
MESSAGE TEXT
END STATEMENT SUPPLIED BY ASSEMBLER.
End of input detected but no end card received.
NAME FIELD OF MEND STATEMENT MAY
ONLY CONTAIN A SEQUENCE SYMBOL.
NAME FIELD OF MACRO DEFINITION
HEADER MUST BE BLANK.
The name of the operation code MACRO
must be blank.
REQUIRED OPERAND ENTRY MISSING.
The operation code in the statement requires
an operand field entry.
SYMBOLIC PARAMETER CANNOT BE
USED AS A GBLA OR GBLC OPERAND.
SET SYMBOL MAY NOT BE DEFINED AS
BOTH SETA AND SETC.
END QUOTE MISSING.
MACHINE AND ASSEMBLER OPERATION
CODES MAY NOT BE USED AS MACRO
INSTRUCTION.
MULTIPLE DEFINITION OF MACRO
INSTRUCTION.
Macro instruction has been previously defined.
NAME ENTRY OF MACRO PROTOTYPE
STATEMENT MUST BE BLANK OR A
VARIABLE SYMBOL.
MORE THAN 35 SYMBOLIC PARAMETERS.
Only 35 symbolic parameters are allowed.
NAME ENTRY OF MACRO INSTRUCTION
MAY NOT BE A VARIABLE SYMBOL.
STATEMENT OUT OF SEQUENCE.
INVALID ISEQ SYNTAX.
In an ISEQ statement the name entry must be
blank and the parameters must be separated by
a comma and must be terminated by a space.
INVALID ICTL SYNTAX. |
Inan ICTL statement the name entry must be
blank.
LINE
NUMBER
nnnn
nnnn
nnnn
- nnnn
nnnn
nnnn
- NANN
nnnn
nnnn
nnnn
nnnn
ERROR
TYPE
W
Wor IF
ERROR
CODE
AS02067
AS02068
AS02069
“AS02070
AS02071
AS02072
AS02073
AS02074
AS02075
AS02076
AS02077
MESSAGE TEXT
NAME FIELD OF GBLA AND GBLC
STATEMENTS MUST BE BLANK.
OPERAND SYNTAX ERROR.
An invalid character is in the operand field
or invalid termination of a sublist, etc.,
appears in the operand field.
OPERAND LENGTH ERROR.
The maximum number of characters allowed
per operand is 127.
MORE THAN 35 OPERANDS.
Only 35 operands are allowed in a macro
prototype or a GBLA or GBLC statement or
a macro definition instruction statement.
NAME ENTRY MAY NOT BE A SEQUENCE
SYMBOL.
NAME FIEL D MUST CONTAIN A SET
SYMBOL.
SET SYMBOL MAY NOT BE DEFINED AS
BOTH SETA AND SETC.
MNOTE =. . ‚insert.
An MNOTE Assembler instruction has been
encountered. The MNOTE message is output
to the error file and processing continues.
VALUE OF OPERAND EXCEEDS 65535.
A number being converted from EBCDIC to
binary has a value greater than +65535. The 5
least-significant digits are converted to binary
and only the least-significant 16 bits of the
result are retained.
INVALID ADO EXPRESSION.
The expression in the operand field of this
ADO instruction did not resolve to an
integer of value between O and 65535. The
ADO statement is not processed.
IMPROPER ADO TERMINATION.
1. The sequence symbol in the name field
of this ADO statement terminates the
currently active ADO loop. The currently
active ADO loop is unstacked and the
ADO statement is not processed.
LINE ERROR ERROR
NUMBER TYPE _CODE
nnnn F AS02078
nnnn F AS02079
nnnn F AS02080
nnnn F AS02081
nnnn F AS02082
G-8
MESSAGE TEXT
2. The sequence symbol in the name field
of this macro instruction terminates the
currently active ADO loop. The
currently active ADO loop is unstacked.
3. A MEXIT or MEND instruction has been
encountered, and the currently active
ADO loop is at the current macro nesting
level. The currently active ADO loop is
unstacked.
SECOND ADO OPERAND MISSING.
The sequence symbol is missing from the
operand field of this ADO statement. The
ADO statement is not processed.
BACKWARD BRANCH IN ADO OR AGO.
The statement which contains the sequence
symbol referred to in this ADO or AGO
statement precedes the current statement.
The ADO or AGO statement is not
processed.
INVALID CONTINUATION.
1. Substitution into a source statement
cannot be completed without generating
more than one continuation line. Sub-
stitution is discontinued.
2. Substitution into a form reference
cannot be completed without generating
more than one continuation line. The
statement is not processed.
DUPLICATE DEFINITION OF VARIABLE
SYMBOL.
1. A variable symbol defined in a macro
instruction is already in the local symbol
table at the current macro nesting level.
2. &SYSECT or &YSNDX is already in the
local symbol table at the current macro
nesting level.
The value already in the symbol! table is
retained.
DUPLICATE FORM DEFINITION.
More than one definition was encountered
for the current form. The form definition
is dropped. |
LINE
NUMBER
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
ERROR
TYPE
ERROR
CODE
AS02083
AS02084
AS02085
AS02086
AS02087
AS02088
MESSAGE TEXT
INVALID SEQUENCE SYMBOL.
1. “Sequence symbol does not start with a
period followed:by a letter or $. |
2. Sequence symbol is not 1-8 characters
followed by a space.
The instruction is replaced with ERR.
— INVALID FORM SYNTAX.
The form reference contains a keyword
parameter or a sublist parameter. The form
reference is dropped.
"UNDEFINED SET SYMBOL OR SYMBOLIC
PARAMETER.
1. Set symbol or symbolic parameter is
not found in symbol table. Substitute
null value for missing value.
2. Global set symbol is not found in
symbol table. The ADO statement is
not processed.
3. Global set symbol is not found in
symbol table. The SETA or SETC
statement is not processed.
INVALID SUBSTITUTION OF SEMICOLON.
The first character of the value assigned to a
variable symbol is a semicolon, and the
character which would immediately precede it
in the substitution record is not an escape
character { ). Substitute null for the value.
UNDEFINED MACRO.
1. The operation code in a statement
created by substitution is neither an
ordinary instruction nor a form
, Instruction.
2. The operation code in this statement
is neither an ordinary instruction nor
a form instruction, nor can it be found
in the macro library.
The instruction is replaced by ERR.
INVALID NAME ENTRY.
1. Symbol in the name field of record
created by substitution is either too
long or contains an invalid character.
2. Name field of form definition is either
an instruction mnemonic or it is not an
ordinary symbol.
LINE
NUMBER
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
ERROR
TYPE
ERROR
CODE
AS02089
AS02090
AS02091
AS02092
AS02093
AS02094
AS02095
MESSAGE TEXT
3. Statement has nonblank name field.
4. Statement has nonblank name field
which is not a sequence symbol.
5. Statement has nonblank name field
which is not an ordinary symbol or
a sequence symbol.
6. Name field of ADO statement contains
an ordinary symbol.
7. Name field of SETA statement does not
contain a SETA symbol.
8. Name field of a SETC statement does
not contain a SETC symbol.
For conditions 1, 3, 4, 5, and 6, the name
field is ignored. For condition 2, form
definition is not processed. For conditions
7 and 8, SETA and SETC statements are
not processed.
ADO OR AGO OPERAND MUST BE A
SEQUENCE SYMBOL.
The ADO or AGO statement is not processed.
SYSNDX NOT IN SYMBOL TABLE.
Assembler logic error. The SETA and SETC
statement is not processed.
MORE THAN FIVE LEVELS OF MACRO
NESTING.
The instruction is replaced by ERR.
OPERAND LENGTH ERROR.
Length of operand or suboperand exceeds
127 bytes. The operand is replaced by null.
TOO MANY OPERANDS.
1. More operands are in a macro call than
there are parameters in the prototype.
2. AGO, SETA, or SETC statement
contains more than one operand.
3. ADO statement contains more than
two operands.
The extra operands are ignored.
MACRO DEFINITION ERROR.
Macro instruction is replaced by ERR.
TOO MANY LEVELS OF ADO NESTING.
The ADO statement is not processed.
LINE
NUMBER
nnnn
nnnn
.ANNRA
nnnn
nnnn
nnnn
nnnn
ERROR
TYPE
ОЕ
ERROR _
CODE
AS02096
AS02097
AS02098
AS02099
AS02100
- AS02101
AS02102
G-11
MESSAGE TEXT
INNER ADO LOOP MUST BE COMPLETELY
CONTAINED WITHIN THE OUTER ADO
LOOP.
Processing of the outer ADO loop is discontinued.
INVALID PRINT OPERAND.
1. ~The operand field is terminated by a comma
or semicolon. |
2. One of the operands is not “OFF, ON,
NOGEN, GEN, NODATA, DATA,
NOCOND, OR COND.”
The remainder of the operand is ignored and the
assembly process continues, using the last valid
operand processed for each option.
MACRO INSTRUCTION MAY NOT HAVE
BOTH POSITIONAL AND KEYWORD
PARAMETERS.
The macro instruction is not processed.
MACRO INSTRUCTION USED AS FORM
NAME.
The name field of a form definition which
was created by substitution contains a
mnemonic that has been identified as a
rnacro instruction. The form definition
is not t processed.
INVALID SET EXPRESSION.
1. The operand field of SETA instruction
contains a nonnumeric character.
The value of a SETA expression exceeds
65,535.
3. The operand field of a SETA or SETC
instruction contains a sublist or a
sequence symbol.
The SETA or SETC instruction is not processed.
”)
REFERENCE TO UNDEFINED SET SYMBOL.
This is an Assembler logic error.
INVALID SUBSTITUTION.
1. The symbol whose value is to be used in
substitution is not a SETA, aSETC,a
symbolic parameter, or &SYSNDX. This
is an Assembler logic error. The value is
replaced by null.
The name field of a statement created by
substitution contains a sequence symbol.
The name field of the statement is ignored.
LINE
NUMBER
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
ERROR
TYPE
F
ERROR
CODE
AS02103
AS02104
AS02105
AS02106
AS02107
AS02108
AS02109
AS02110
G-12
MESSAGE TEXT
REFERENCE TO &SYSNDX VALID ONLY
WITHIN A MACRO.
The SETA or SETC statement is not processed.
REFERENCE TO UNDEFINED FORM.
Reference to a form instruction whose definition
has not yet appeared in the generated source.
The instruction is replaced by ERR.
UNDEFINED KEYWORD OPERAND.
1. The macro instruction has more operands
than the macro prototype has parameters.
2. The macro instruction has at least one
operand whose name does not match any
of the prototype's keyword parameters.
The extra operands are ignored.
REFERENCE TO UNDEFINED SEQUENCE
SYMBOL. |
The ADO or AGO statement is not processed.
INVALID SUBSTITUTION INTO OPERATION
ENTRY.
The instruction in this substitution record was
one which may not be created by substitution.
The instruction is not processed.
MORE THAN 35 SUB-OPERANDS.
This is an Assembler logic error.
OPERATION ENTRY MISSING.
1. The statement created by substitution is
all blank after the name field.
2. The statement created by substitution
has a continuation character immedi-
ately after the name field.
The instruction is replaced by ERR.
INVALID OPERATION ENTRY.
1. The operation code in the statement
created by substitution is more than
eight characters long.
2. The operation field in the statement
created by substitution contains an
invalid character.
3. The operation code in the statement
created by substitution is continued
on the second line of the statement.
The instruction is replaced by ERR.
LINE
NUMBER TYPE
nnnn
nnnn
nnnn
NOTE:
nnnn
NOTE:
nnnn
NOTE:
NOTE:
NOTE:
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
ERROR
W
AS02115 reserved for future use.
F
AS02117 reserved for future use.
F
AS02119 reserved for future use.
AS02120 reserved for future use.
ERROR
CODE
AS02111
AS02112
AS02114
AS02116
AS02118
MESSAGE TEXT
REFERENCE TO DOUBLY-DEFINED
SEQUENCE SYMBOL.
The ADO or AGO statement is not processed.
INSTRUCTION NOT VALID AFTER SEG
STATEMENT.
The instruction is not processed.
SPECIFIED SUBSTRING — LENGTH TOO
LARGE.
INVALID USE OF SEQUENCE SYMBOL.
INVALID USE OF CHARACTER STRING.
AS02121 and AS02122 reserved for future use.
F
AS02123
AS02124
AS02125
AS02126
AS02127
AS03001
AS03002
AS03003
AS03004
EXPRESSION CONTAINS INCOMPATIBLE
OPERAND TYPES.
EVALUATOR — STACK OVERFLOW.
MULTIPLICATION OR DIVISION OVERFLOW.
UNDEFINED SEQUENCE SYMBOL OR
VARIABLE SYMBOL.
INVALID SUBSTRING OR SUBLIST
REFERENCE.
OPERAND SIZE OR NUMBER OF TERMS
EXCEEDS MAXIMUM.
This message indicates internal stack overflow.
To correct the condition, reduce the number
of terms in the expression or number of oper-
ands.
UNMATCHED RIGHT PARENTHESIS.
UNMATCHED LEFT PARENTHESIS.
EXPRESSION OR SUBLIST CONTAINS AN
INVALID COMMA.
LINE
NUMBER
NOTE:
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
NOTE:
nnnn
nnnn
ERROR
TYPE
AS03005 reserved for future use.
F
ERROR
CODE
AS03006
AS03007
AS03008
AS03009
AS03010
AS03011
AS03012
AS03013
MESSAGE TEXT
INVALID USE OF INDIRECTION
*, . ‚Insert, . .*
The use of the indirect operator, @, is invalid.
INVALID EXPRESSION «*. . ‚insert. . .*
The syntax does not follow the rules for
coding expressions.
INVAL ID USE OF LITERALS =. . .insert. ..
The use of the literal operator, =, is invalid in
this statement.
INVAL ID Usk OF PARENTHESIS
‚insert.
CHARACTER STRING INVALID WITH
+-* OR / OPERATOR *.. .insert. . .+
Arithmetic operations are invalid with strings.
INVALID SUBLIST =... .insert. . .*
The use of the sublist is invalid in this
statement.
RELOCATABLE TERM USED IN MULTI-
PLICATION, DIVISION OR LOGICAL
OPERATION +*.. .insert. . .*
The location counter, *, may not enter into
the above mentioned operations.
MAY NOT FOLLOW A LOGICAL, RELA-
TIONAL OR ARITHMETIC OPERATOR
insert. .
The unary operator NOT may not follow the
above mentioned operators.
AS03014 and AS03015 are reserved for future use.
F
AS03016
AS03017
SYMBOL TOO LONG *. . .insert. . .*
A name entry or a symbolic operand may not
exceed 8 characters.
INVALID HEXADECIMAL CONSTANT
*. . Insert. . .*
A hexadecimal constant may only contain
digits 0-9 and characters A-F.
*
LINE
NUMBER
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
NOTE:
nnnn
nnnn
nnnn
NOTE:
nnnn
ERROR ERROR
TYPE — CODE
F AS03018
F AS03019
F AS03020
F AS03021
F AS03022
F AS03023
AS030024 is reserved for future use.
F AS03025
W AS03026
W AS03027
MESSAGE TEXT
OPERAND SIZE OR NUMBER OF TERMS
EXCEEDS MAXIMUM «. . .insert. . .*
This message indicates internal stack overflow.
To correct the condition, reduce the number
of terms in the expression or the number of
operands.
INVAL ID OPERATOR +... .insert. ..*
The operator or symbol is not in the language.
INVALID CHARACTER +*.. .insert. . .+
The character is not in the language or is
contextually incorrect.
INVALID CONTINUATION =. . .insert. . .»
The usage of the semicolon is contextually
invalid.
INVAL ID SYMBOL *.. .insert. . +
The length attribute operand may only be
symbolic.
INVALID STRING *. . .insert. . .*
An invalid string structure appeared.
INVALID STRING =. . .insert. . .*
Same as AS03023 above.
OPERAND TRUNCATED — TOO LONG
*. . Ansert. . .+
The number of digits exceeds the maximum
allowed. For a decimal integer, 5 is the
maximum. For an integer string, 10 is the
maximum. For a hexadecimal constant, 4
is the maximum.
VALUE TRUNCATED — EXCEEDS PER-
MISSIBLE MAGNITUDE «.. .insert. ..*
A decimal integer may not exceed 65,535.
An integer string may not exceed 4,294,967,295.
AS03028 and AS03029 are reserved for future use.
W AS03030
G-15
INVALID USE OF NAME ENTRY.
LINE
NUMBER
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
NOTE:
nnnn
nnnn
nnnn
NOTE:
ERROR ERROR
TYPE CODE
F AS03031
F AS03032
F AS03033
F AS03034
F AS03035
F AS03036
F AS03037
AS03038 is reserved for future use.
F AS03039
F AS03040
F AS03041
AS03042 is reserved for future use.
MESSAGE TEXT
INVALID FORM DEFINITION.
A form reference cannot be used as an operand
entry.
INVALID USE OF $SYSEG.
$SYSEG is invalid in an evaluated expression,
REL OCATABLE TERM INVALID WITH
UNARY OPERATOR.
A relocatable term may not be used in con-
junction with a NOT operator.
INVALID USE OF STRING CONSTANT.
A string constant may not be used as a term
in conjunction with an arithmetic or logical
operator.
RELOCATABLE TERM INVALID WITH */
OR LOGICAL OPERATOR «*., ..insert. . .*
A relocatable term may not be used in con-
junction with a multiplication, division, or
logical operation.
INVALID SYNTAX.
The operand structure does not. follow the
rules of the language.
MORE THAN SIX RELOCATABLE TERMS.
An expression may not contain more than six
unresolved relocatable terms.
INVALID STRING *.. .insert. . .*
Both strings in a relational or logical operation
must be the same type.
OPERAND SIZE OR NUMBER OF TERMS
EXCEEDS MAXIMUM +.. insert... .*
The expression size is too large to be evaluated.
MULTIPLICATION OR DIVISION OVER-
FLOW x...insert...*
Either division overflow has occurred or the
second term of a multiplication or division
operation exceeds a 16-bit value.
G-16
LINE ERROR ERROR
NUMBER TYPE CODE MESSAGE TEXT
nnnn F AS03043 RELOCATABLE TERM INVAL ID WITH
RELATIONAL OPERATOR *+*.. .insert.. .»
A relocatable term may not be used in con-
junction with a relational operator.
nnnn F AS03044 UNDEFINED SYMBOLIC OPERAND.
The reference is not used as a label within
this program.
NOTE: AS03045 is reserved for future use.
NOTE: AS03046 through AS03050 are reserved for future use.
nnnn F AS03051 DUPLICATE DEFINITION OF NAME
ENTRY. =«...insert.. .*
The name field entry definitions must be
unique. All duplicates are discarded.
nnnn F AS03052 ENTRY POINT DEFINITION IS NOT
RELOCATABLE «.. .insert.. .»
The entry point definition must resolve
to a relocatable term.
nnnn F AS03053 CSECT NAME IS ALREADY DEFINED,
BUT NOT AS CSECT =. . .insert.. .»
Control section names must not appear as
ordinary name field entries.
nnnn F AS03054 COM NAME IS ALREADY DEFINED,
BUT NOT COM =, . .insert. . .*
COM names must not appear as ordinary
name field entries.
NOTE: AS03055 is the same as AS03052.
NOTE: AS03056 through AS03058 are reserved for future use.
nnnn F AS03059 DUPLICATE FORM DEFINITION. *. . .insert. . .
The form definition name entry is previously
defined.
nnnn F AS03060 INVALID SYNTAX IN STORAGE
RESERVATION. | |
The operand of a reserve storage instruction
must be preresolved, absolute, positive arithme-
tic expression. Only one operand is allowed.
nnnn F AS03061 INVALID SYNTAX IN DATA DEFINITION.
The syntactical structure of the data definition
operand is invalid.
G-17
LINE
NUMBER
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
NOTE:
nnnn
nnnn
nnnn
nnnn
nnnn
ERROR
F
TYPE
ERROR
CODE
AS03062
AS03063
AS03064
AS03065
AS03066
AS03067
MESSAGE TEXT
INVALID USE OF INDIRECTION.
An indirect operator is invalid in data
definition operands.
INVALID USE OF LITERAL.
The literal operator is invalid in size or
repetition field of a data definition operand.
INVALID SIZE SPECIFICATION.
The size operand of data definitions must
be preresolved absolute expression.
INVALID REPETITION FACTOR.
The repetition factor of a data definition
operand must be a preresolved absolute
expression.
VAL UE OF LOCATION COUNTER
EXCEEDS 65,535.
TRUNCATION OCCURRED.
The implied size of the value operand is
greater than the explicit size operand in a
data definition.
AS03068 through AS03069 are reserved for future use.
F
AS03070
AS03071
AS03072
AS03073
AS03074
G-18
INVALID USE OF $SYSEG.
The data following $SYSEG definition must
be two bytes long, word aligned, and relocatable.
REQUIRED OPERAND ENTRY MISSING.
This instruction requires an operand and none
was supplied.
INVALID SUBLIST.
The syntax indicates a suboperand, but the _
instruction does not allow suboperands.
INVALID USE OF LITERAL.
The instruction does not allow a literal as an
operand, but one was coded.
INVALID USE OF INDIRECTION.
The instruction does not allow indirection,
but indirection was coded.
LINE ERROR ERROR
NUMBER TYPE CODE MESSAGE TEXT
nnnn F AS03075 INVALID EXPRESSION.
| The expression coded does not fall within the
types allowed.
1. À string type was used where only
arithmetic type expressions are allowed.
2. An unresolved expression was coded on
an instruction which required expressions
to be predefined.
3. A relocatable expression is coded where
only absolute are allowed.
nnnn W. AS03076 NAME FIELD OF ORG STATEMENT MAY
ONLY CONTAIN A SEQUENCE SYMBOL.
nnnn W AS03077 INVALID RELOCATION.
1. An absolute value was coded where a
relocatable value was required.
2. The relocation identifier does not
match the relocation identifier for the
control section in effect; e.g., trying to
ORG to another CSECT or COM section.
nnnn Fo AS03078 NAME ENTRY REQUIRED ON AN EQU
STATEMENT.
nnnn W AS03079 TOO MANY OPERANDS.
More than the maximum number of operands
allowable for this instruction were coded. The
values of the first operands were used.
nnnn CF AS03080 ONLY SINGLE TERM RELOCATABLE
| EXPRESSIONS ARE VALID.
nnnn F AS03081 COMBINED CSECT, COM AND EXTRN
COUNT EXCEEDS 252.
The binary generated will probably not be
useless. Reduce the number of EXTERNs
and CSECTs and COMs and reassemble.
nnnn W AS03082 INVALID NAME ENTRY.
The name entry was coded where none was
allowed. The name entry has not been entered
into the symbol table. Any reference to it will
result in an undefined reference.
nnnn F AS03083 REFERENCE TO INVALID FORM DEFINITION.
1. The operation entry matches something other
than a FORM definition.
2. There was no such entry.
3. No operand was coded on the reference.
LINE
NUMBER
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
ERROR
TYPE
F
ERROR
CODE
AS03084
AS03085
AS03086
AS03087
AS03088
AS03089
AS04001
AS04002
AS04003
AS04004
AS04005
AS04006
MESSAGE TEXT
OPERAND SIZE EXCEEDS 255 BITS.
A FORM definition was coded with an operand
which did not resolve to an absolute value less
than 255.
DUPLICATE DEFINITION OF NAME ENTRY.
"NAME ENTRY REQUIRED ON A FORM
G-20
DEFINITION.
CSECT NAME MAY NOT DUPLICATE COM
NAME.
The name entries of CSECT and COM state-
ments cannot duplicate each other in the same
assembly.
ONLY ONE TITLE STATEMENT IN A
PROGRAM MAY HAVE A NONBLANK
NAME FIELD.
INVALID PRIME ENTRY POINT.
1. The operand of an END statement does
not resolve to an even boundary.
2. The operand does not reference a
relocatable value.
INVALID FORM DEFINITION.
A form reference cannot be used as an operand
entry.
INVALID USE OF $SYSEG.
$SYSEG is invalid in an evaluated expression.
RELOCATABLE TERM INVALID WITH
UNARY OPERATOR.
A relocatable term may not be used in
conjunction with a NOT operator.
INVALID USE OF STRING CONSTANT.
A string constant may not be used as a term
in conjunction with an arithmetic or logical
operator.
RELOCATABLE TERM INVALID WITH */
OR LOGICAL OPERATOR x...insert...*
A relocatable term may not be used in conjunc-
tion with a multiplication, division, or logical
operation.
INVALID SYNTAX. |
The operand structure does not follow the rules
of the language.
MESSAGE TEXT
MORE THAN SIX RELOCATABLE TERMS.
An expression may not contain more than six
unresolved relocatable terms.
INVALID STRING =. ..insert.. .
Both strings in a relational or logical operation
must be the same type.
OPERAND SIZE OR NUMBER OF TERMS
EXCEEDS MAXIMUM +*.. insert. . .*
The expression size is too large to be evaluated.
MULTIPLICATION OR DIVISION OVERFLOW
*, , insert... .*
Either division overflow has occurred or the
second term of a multiplication or division
operation exceeds a 16-bit value.
RELOCATABLE TERM INVALID WITH
RELATIONAL OPERATOR *.. insert. . .*
A relocatable term may not be used in conjunction
with a relational operator.
IUNDEFINED SYMBOLIC OPERAND.
The reference is not used as a label within this
program.
TRUNCATION OCCURRED.
The value coded exceeded the match field on a
FORM definition. Normal rules of truncation
“are followed.
LINE ERROR ERROR
NUMBER TYPE CODE
nnnn F | AS04007
NOTE: AS04008 is reserved for future use.
nnnn F AS04009
nnnn F AS04010
nnnn F AS04011
NOTE: AS04012 is reserved for future use.
nnnn F ~ AS04013
nnnn F AS04014
NOTE: AS04015 reserved for future use.
nnnn W AS04016
nnnn W AS04017
nnnn W AS04018
nnnn F AS04019
G-21
TOO MANY OPERANDS.
REQUIRED OPERAND ENTRY MISSING.
Fewer operands were coded in a form reference
than were coded in the FORM definition.
INVALID RELOCATION-VALUE TREATED
AS ABSOLUTE.
1. The receive field was not 16 bits or was
not on an even byte boundary. The number
of relocation identifiers was greater than one.
2. For $SYSEG, the receive field was not 8 bits
long, or was not on a byte boundary.
ERROR
CODE
AS04020
AS04021 is reserved for future use.
AS04022
AS04023
AS04024
AS04025 is reserved for future use.
AS04026
AS04027
AS04028
AS04029 is reserved for future use.
LINE ERROR
NUMBER TYPE
nnnn F
NOTE:
nnnn W
nnnn W
nnnn W
NOTE:
nnnn W
nnnn W
nnnn F
NOTE:
nnnn W
nnnn F
nnnn F
AS04030
AS04031
AS04032
MESSAGE TEXT
INVALID SYNTAX. a
The syntax of a FORM reference operand may
have had one of the following errors:
1. Indirection coded
2. A sublist coded
3. No operand was coded.
TITLE OPERAND MUST BE A CHARACTER
STRING.
LENGTH OF TITLE OPERAND EXCEEDS 90
CHARACTERS.
The operand is truncated on the right to 90
bytes and then used.
SPACE OPERAND MUST BE A RESOLVED
ARITHMETIC EXPRESSION.
FORWARD REFERENCE TO STRING EQUATE
— IMPLICIT STRING — LENGTH IS 2 BYTES.
A data definition operand referencing a forward
string equate is implicitly resolved to two bytes.
Truncation or padding may have occurred.
TRUNCATION OCCURRED.
The implicit size of the value operand is greater
than the explicit size operand in data definitions.
INVALID RELOCATION — VALUE TREATED
AS ABSOLUTE.
A relocatable value must be on word boundary
and two bytes in length. The number of relocation
factors in an expression must be resolved to one.
NOP SUBSTITUTED FOR INVALID
OPERATION CODE.
TOO MANY OPERANDS OR SUBOPERANDS.
Refer to the MRX/OS Assembler Reference
manual to determine the maximum number of
operands. |
INVALID INDIRECTION OR LITERAL USAGE.
G-22
LINE
NUMBER
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
nnnn
ERROR
TYPE
W
ERROR
CODE
AS04033
AS04034
AS04035
AS04036
AS04037
AS04038
AS04039
AS04040
AS04041
AS04042
AS04043
AS04044
G-23
MESSAGE TEXT
LITERAL POOL SIZE EXCEEDS MEMORY
LIMITS.
The current literal pool is located at an address
greater than 65,535. Binary generation is
suppressed.
INVALID USE OF STRING CONSTANT.
A string constant may have been used as an
address or as a register designator.
LOSS OF SIGNIFICANCE.
An immediate operand cannot contain the
amount coded. |
INVALID RELOCATION.
More than one relocatable value remains after
evaluation.
REQUIRED SUBOPERAND MISSING.
An instruction which must have a certain
minimum of operands or suboperands has
been coded without one or more of them.
VALUE NOT WITHIN RANGE OF
DESIGNATED FIELD.
The resolved value exceeds the maximum
value, permitted.
EXPLICIT USE OF REGISTER ZERO AS
AN INDEX.
Register zero has no effect as an index register,
but it was coded as an index.
TRUNCATION OCCURRED.
A string constant used in a direct instruction
exceeds 2 bytes. Normal rules of truncation
are used.
WORD BOUNDING REQUIRED.
The instruction functions only on even bounded
addresses, but an odd address was coded.
RELOCATABLE TERM USED — ABSOLUTE
VAL UE REQUIRED.
EDIT LENGTH L2 MUST BE GREATER THAN
L1 UNLESS L2 ISZERO.
INVAL ID USE OF $SYSEG.
$SYSEG is not allowed as an operand or sub-
operand of any machine instruction.
LINE ERROR ERROR
NUMBER TYPE CODE MESSAGE TEXT
nnnn F AS04045 INVALID ENTRY POINT.
The entry point did not resolve to a relocatable
value. Note that the line number is associated
with the END statement because the fact cannot
be discovered when the ENTRY instruction was
encountered.
nnnn F AS04046 MORE THAN 175 SEG DIRECTIVES
ENCOUNTERED — FIRST 175 USED.
G-24
ASSEMBLER ABORT MESSAGES
The MRX/OS Assembler abort messages are printed as the final line(s) of the listing. The
assembly is aborted when any of these messages appear. The messages and their explanations
are given below. The format of the messages is exactly as presented.
MESSAGES
ERROR IN PHASE CALL.
Assembler in error.
ERROR IN 1/0 HANDLING.
INPUT BLOCK SIZE EXCEEDS MEMORY AVAILABLE.
The partition size is too small to handle the larger input block size. Increase the partition
size for this input file. In 8K, the maximum input block size allowed is 86 bytes.
PARTITION-SIZE LESS THAN 8K BYTES.
The Assembler requires a minimum of 8K bytes to run.
SYMBOL TABLE ERROR.
Assembler in error.
SYSTEM MACRO BLOCK SIZE TOO LARGE (GREATER THAN 86 BYTES).
END OF INPUT OCCURRED WHILE PROCESSING A MACRO — MEND STATEMENT
MISSING.
Either an end of input or an END statement was detected while a macro definition was
being processed. |
FATAL ERROR IN ICTL STATEMENT PARAMETER.
In an ICTL statement, the first parameter is less than 1 or greater than 40, or the second
parameter is less than 40 or greater than 120.
PARAMETER
DELIMITER ERROR IN COLUMN xx IN STATEMENT *.. .insert. ..
PARAMETER CARD ERROR — JOB ABORTED.
On a //PAR statement, either a parameter or a delimiter is in error. The contents of the
//PAR statement, but not the characters //PAR, are printed as an insert between the
asterisks. The column number, xx, indicates the erroneous character, column 1 being the
first character between the asterisks. Several parameter or delimiter errors may be listed in
succession before the PARAMETER CARD ERROR message.
FATAL ERROR IN ICTL STATEMENT SYNTAX.
The ICTL statement parameters must be separated by a comma and terminated by a space.
G-25
SPECIFIED IMEM NOT FOUND IN LIBRARY.
Either the member name does not exist or the wrong library name was used.
MEND STATEMENT MISSING IN SYSTEM MACRO.
While processing a system macro definition an end of input was detected, but not a MEND
statement. Check if the system macro library has been destroyed or if just one macro was
incorrectly written on it.
BINARY REQUESTED — BUT OMEM1 NOT SUPPLIED.
A member name must be provided so that the binary may be entered in the object library
under that name.
OPERAND MISSING IN ICTL STATEMENT.
An ICTL statement requires an operand entry.
SYSTEM MESSAGES
The following system messages cause the assembler to abort.
ERROR CODE MESSAGE TEXT
5021 ILLEGAL BLOCK NUMBER.
If the assembly process has not reached the print phase, the most
probable cause is too small an allocation of MAXSIZ. Another
possible cause is too small a file allocated for OMEM2.
If the assembly process has reached the print stage, the most
probable cause is that the binary file (OUTPUT1) has been filled.
21nn These errors are probably caused by an error in the Control Language
statements.
24nn These errors are probably caused by an error in the Control Language
statements. Error 2109 indicates too large a MAXSIZ as a probable
cause. Error 240B indicates that one or more of the user-supplied
files is noncontiguous. The file with multiple extents must be
recreated as a contiguous file.
G-26
INDEX
Abort messages
Absolute
expressions, definition of
terms, definition of
Addressing in machine instructions
ADO statement
AGO statement
ALIGN statement
Alignment
of data
of machine instructions
Alphabetical list of machine
instructions
ANOP statement
Arithmetic
constants
operators |
set expressions
Assembler instructions
definition
overview
summary
Assembly options
BDD statement
Begin-end columns
alteration of
description
BRS statement
Byte reserve storage
Byte defined data
Calling assembler
Card codes |
Character
codes
set
set expression
string constants
2-16
10-16
1-1
4-1
E-1
11-1
8-2
6-4
2-18
8-b
8-5
8-2
11-1
A-1
A-1
2-1
10-18
2-5
Coding form
~~ format of
statement continuation
COM statement
Comments |
Common control sections (see
COM statement)
Conditional assembly statements
ADO
AGO
ANOP
GBLA
GBLC
SETA
~~ SETC
Constants
arithmetic
string
Continuation of statements
Control language for assembler
Control sections
and location counter
assembler statements for
Count attribute of macro instruc-
tion operand
Cross reference list, suppressing
CSECT statement
Data definition statements
Diagnostic messages
EBCDIC table |
EJECT statement
END statement
ENTRY statement
EQU statement
Error messages
abort messages
diagnostic messages
system messages
Index-1
2-18
2-21
2-20
10-20
10-23
10-23
10-20
10-20
10-16
10-18
2-7
2-5
2-21
11-1
2-11
10-24
11-2
5-1
8-1
G-1
A-1
9-2
0-3
5-2
8-1
“6-25
G-26
Expressions
absolute
definition
evaluation of
relocatable
Extended mnemonics
EXTRN statement
FORM definition statement
FORM instruction statement
GBLA statement
GBLC statement
General purpose machine instruc-
tions
Global arithmetic and character
set symbols
Hex codes of machine instruc-
tions
Hexadecimal string constants
ICTL statement
Identification-sequence field
Index registers
Input format control
Integer string constants
ISEQ statement
Job control language (see
Control language)
Linkage editor
and control sections
and symbol linkage
map directive (SEG)
Linking statements
Listing control statements
EJECT
PRINT
SPACE
TITLE
Literal pools
and LTORG statement
description
Literals
description
in WDD and BDD statements
2-17
2-14
2-15
2-18
3-10
5-3
8-7
10-20
10-20
3-3,3-5
10-20
6-4
2-20
3-2,3-3
6-4
2-6
6-5
5-2
7-1
5-1,5-2
9-2
9-3
9-2
9-1
6-4
2.13
2-13
8-3
Location counter
and ALIGN statement
and ORG statement
and WDD and BDD statements
description
reference (asterisk)
Logical operators
LTORG statement
Machine instructions
alphabetical list
definition
hex code to mnemonic
object formats
summary
Macro language
concatenation of variable
symbols
count attribute
example
file definstion
general description
macro definition
macro instruction
MEXIT statement
MNOTE statement
nesting of macros
number attribute
sublists in macro instructions
sublists in model statements
substring notation
system variable symbols
(&SYSNDX, &SYSECT)
Messages, error
Mnemonic definition (FORM)
Narne field, description
Notation used to describe
machine instructions
Number attribute of macro
Object formats of machine instruc-
instruction operand
tions
Object program
Index-2
definition
file definition
6-6
6-1
8-4
2-11
2-11
2-16
6-4
C-1
1-1
B-1
3-1
10-11
10-24
F-1
11-1
10-1
10-1
10-5
10-13
10-12
10-13
10-25
10-9
10-9
10-10
10-13
С-1
8-7
2-3
3-2
10-25
B-1
1-1
11-1
Operand field, description
Operating system, relationship to
assembler
Operation codes (hex) for
machine instructions
Operation field, description
Operators
Ordinary symbols
ORG statement
Packed decimal string constants
PRINT statement
Program
control statements
listing
sectioning
termination
PUNCH statement
Registers
Relational operators
Relocatable
expressions, definition of
symbols, identification of
terms, definition of
Reserving storage
SEG statement
Segment names (see SYSEG)
Sequence checking statements
Sequence symbols |
Set symbols
SETA statement
SETC statement
Source program
definition
file definition
listing contro!
Source statements
basic format
character set
coding form
expressions
2-3,2-20
D-1
2-3,2-20
2-16
2-9
6-1
2-6
6-1
1-2,9-1
5-1
6-3
3-2,3-3
2-16
2-18
5-1,5-2
2-4
8-5
7-1
6-5
2-11
10-16
10-16
10-18
1-1
11-1
9-1,11-2
2-1
2-18
2-3,2-14
Source statements (continued)
terms
SPACE statement
String constants
character
hexadecimal
integer
packed decimal
zoned decimal
Symbol definition statements
Symbol length attribute
Symbolic linkage statements
Symbols
definition
ordinary
rules for using
sequence
variable
SYSEG reserved name
System
machine instructions
messages
requirements for assembler
TITLE statement
Termination of assembly
Terms
constants
definition
literals
location counter reference
symbols
symbol length attribute
Variable symbols
WDD statement
Word defined data
Word reserve storage
Writing to disk file
WRS statement
Zoned decimal string constants
Index-3
2-3,2-4
2-12
2-11
2-10
5-6,8-3
3-3,3-9
2-3,2-4
2-13
2-11
2-8
2-12
2-10
— —— — — — — — — — =" "= —__ =" ie vb ——o—] —]oÑ—]]—]——_— —o—]Ú— —i—]_—s
+ *
COMMENTS FORM
| MRX/OS Assembler Reference Manual (2202.001-01) |
Please send us your comments, to help us produce better publications. Use the space below to
qualify your responses to the following questions, if you wish, or to comment on other aspects of
the publication. Please use specific page and paragraph/line references where appropriate. All
comments become the property of the Memorex Corporation. |
Yes No
e Is the material:
Easy to understand? .......ñoÑeceoorereredrerco O O
Conveniently organized? .....eod re mea ra ea e a O D
Complete? ... 1.114 4 444 4 4 4 0 4 0 4 4 8 4 naa a aa aa О |
Well illustrated? . . . . RR RR RR 4 00 a a
Accurate? . . 12 1 41 4 4 1 4 4 4 4 4 0 4 4 4 4» 1 8 a 4 4 40 0 О a
Suitable for its intended audience? . . . . . . . .. ........ O o
Adequately indexed? . .. ...oc|om em e nene noe ae 0 O
e For what purpose did you use this publication? (reference, general interest, etc.)
e Please state your department's function:
e Please check specific criticism(s), give page number(s), and explain below:
Clarification on page(s)
Addition on page(s)
Deletion on page(s)
o d da
Error on page(s)
First Class
Permit No. 14831
Minneapolis,
Minnesota 55427
Business Reply Mail
>) No Postage Necessary if Mailed in the United States
Postage Will Be Paid By
=
= _E
JU Memorex Corporation =
ГЛ
><
Midwest Operations — Publications a
8941 Tenth Avenue North
Minneapolis, Minnesota 55427
= 5 e 0, 8 #8 do ®w = = ® ¥ = ве т те = F OE BS F 8 4 = = = 4% = +: BR FP = 8 #8 U ® BF OF SOF FF FOF FEF EF OB = #6 & 5 8 6 8 8 8 FF FF SF OE ss ETE
+ + A BR § FF # 0 + © » =: 6 0 =: + EA 4 =: 6 = =: = BE S&S A & BF Ut tt W EN #6 8 4 BR она веяния 6 8 + € € à 0 #8 #8 BR FFA 8 & 5 EE FN 8 # 5 # ен в 8 à
Thank you for your information. .........
Our goal is to provide better, more useful manuals, and your
comments will help us to do so.
aa 1 4 a a 24 à Memorex Publications
">
Download
Advertisement
Key features
Translates source programs
Supports macro instructions
Conditional assembly
Controls address assignment
Defines data and symbols
Segments programs
Frequently asked questions
The MRX/OS Assembler translates source programs into object programs that can be executed by the system.
Machine instructions and assembler instructions.
Checking and documenting programs, controlling address assignment, segmenting programs, defining data and symbols, generating macro and form instructions, and controlling the assembly process through conditional assembly statements.