|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 152960 (0x25580) Types: TextFile Names: »D83«
└─⟦e634bf8f4⟧ Bits:30005867/disk11.imd Dokumenter (RCSL m.m.) └─⟦this⟧ »D83«
\f 1_._ _ _ _ _ _ _ _ _I_N_T_R_O_D_U_C_T_I_O_N_._ 1. The RC8000 MACRO Assembler translates a source program written in a symbolic programming language, Macro Assembly Language, into an object program which can be linked, loaded and executed on the RC8000. 1_._1_ _ _ _ _ _ _ _M_a_c_r_o_ _A_s_s_e_m_b_l_y_ _L_a_n_g_u_a_g_e_._ 1.1 The Macro Assembly Language allows you, symbolically to express pseudo- or computer instructions, addresses or data. Furthermore, it includes a macro capability. Example 1 shows an example of a Macro Assembly Language program, as listed by the Macro As- sembler. The example shows the following features (p/ll denotes page p line ll): - comments, preceeded by a semicolon, ; . the generated code/results of evaluation of expressions are listed in the margin of the listing. - 1/02: the name of the program, and a short explanatory title is defined. - 1/03: the revision number is defined. - 1/09ff: declaration of external references, i.e. entry points in another module (in this case the File Processor). - 1/13ff: inclusion from a library of two macros, named ZONE., and PNAMES.. These macros are later used to declare a zone (2/02) and to define some standard displacements (1/17), e.g. the name PSEP used in 1/21. - 1/18: entering a resident section, i.e. the code should be placed resident in core. - 1/21ff: RC8000 assembly code. - 1/21: example of indexed addressing. - 1/23: example of relative addressing. \f - 1/27: example of indirect (*) addressing, and pooling (=) of a constant containing the absolute address of the procedure CONOUT, i.e. fp connect output. - 2/02: declaration of a zone, i.e. call of a macro which sets up the necessary parts of a zone. - 2/02ff: the margin shows the code generated by the macro ZONE.. - 2/03: the zone descriptor address. - 2/05: assignment of a value to a symbol. - 2/07: generation of computer words containing text. - 2/08: end of program. The starting address for the program is specified. Finally: The size of the program is shown. 1_._2_ _ _ _ _ _ _ _M_a_c_r_o_ _A_s_s_e_m_b_l_e_r_._ 1.2 The Macro Assembler is a two-pass assembler. It reads the source program twice. During pass one, the assembler builds a name table of all defined labels and symbols, and the values and attributes are assigned to these names. During pass two, the assembler gene- rates the final relocatable code, and optionally, a listing. \f (EXAMPLE 1) \f (EXAMPLE 1 (CONT))\f 2_._ _ _ _ _ _ _ _ _A_S_S_E_M_B_L_Y_ _L_A_N_G_U_A_G_E_._ 2. The MACRO assembly language uses the following character set: letter'::= ABCDEFGHIJKLMNOPQRSTU VWXYZÆØÅ abcdefghijklmnopqrstu vwxyzæøå digit'::= 0123456789 special character'::= +-*/'=(),;.:>"#< sp'nl'ff'em' sp'::= the space character' nl'::= the new line character' ff'::= the form feed character' em'::= the end medium character' 2_._1_ _ _ _ _ _ _ _S_o_u_r_c_e_ _S_t_a_t_e_m_e_n_t_ _F_o_r_m_a_t_._ 2.1 The basic unit of a MACRO assembly language program is the source statement. A source statement is usually written on a single line: line'::= ff' character sequence' nl' where character sequence' is any sequence of characters but nl', ff', or em'. A line is usually terminated by an nl' cha- racter being a part of the line, but an ff', an em' or a too long character sequence' may terminate it too. A source statement may be written on more than one single line as described in 2.1.2. \f 2_._1_._1_ _ _ _ _ _C_o_m_m_e_n_t_s_._ 2.1.1 Within each line, the character sequence' is processed from left to right up to the first semicolon (;) in that line. After that semicolon anything is regarded as comments in normal processing. However, within strings and in special cases concerning macro de- finitions, the semicolon does not terminate processing of the line. 2_._1_._2_ _ _ _ _ _S_p_a_c_e_s_ _a_n_d_ _C_o_m_m_a_._ 2.1.2 During normal processing of a line, the only function of a space character is to terminate the previous item. Superfluous spaces may be used to produce more readable code. Commas are used to se- parate argument fields, and if a line is terminated by a comma, more arguments may be put on the next line. This is used to con- tinue a statement consisting of many argument fields. Within strings and macro definition lines, spaces and commas have no special interpretation. 2_._1_._3_ _ _ _ _ _C_a_p_i_t_a_l_ _V_e_r_s_u_s_ _S_m_a_l_l_ _L_e_t_t_e_r_s_._ 2.1.3 Outside strings, capital and small letters may be used inter- changeably. 2_._1_._4_ _ _ _ _ _F_o_r_m_a_t_ _N_o_t_a_t_i_o_n_._ 2.1.4 In the description of MACRO assembly language, the following me- talinguistic language is used: \f Sequences of characters enclosed in and ' represent metalingui- stic variables, whose values are sequences of symbols. The mark ::= means "may be composed of" and the mark means "or". The production (rule): sign'::= +- means that any occurence of the variable sign' may be replaced by a + or a -. The braces and signifies that the contents should be regarded as a single meta- linguistic variable. The brackets and signifies that the con- tents should be regarded as a single metalinguistic variable, the presence of which is optional. The elipsis ... means one or more occurences of the preceeding variable but, if it is preceeded by a bracket, , it means zero or more occurences. Within braces and brackets, selection of productions are indica- ted by the mark or by listing the selections vertically. In the formats comma (,) denotes the argument separator, and denotes the statement seperator, end of statement. Thus comments, spaces and continuation features are excluded from the formats. The production rule: data statement'::= DATA. expression',expression'... describes any of the following data statements: DATA. 10, ; NUMBER OF BUFFERS 512 ; SIZE OF EACH BUFFER DATA. 10,512 DATA. (A+B),(A+C), (A-B),(A-C) \f 2_._1_._5_ _ _ _ _ _G_e_n_e_r_a_l_ _F_o_r_m_a_t_ _o_f_ _S_o_u_r_c_e_ _S_t_a_t_e_m_e_n_t_s_._ 2.1.5 S_y_n_t_a_x_:_ statement'::= assignment statement' instruction statement' label assignment'... assembly directive statement' macro call statement' dummy statement' macro definition head' macro definition line' ... S_e_m_a_n_t_i_c_s_:_ A label assignment and an assignment statement is used to assign values to symbols. The instruction statement is used to generate RC8000 instruc- tions. The assembly directive statement is used for controlling the as- sembly process, e.g. code generation or assembly listing. The macro call statement is used to invoke a macro expansion, i.e. a generation of zero or more assembly lines, controlled by the argument fields of the macro call statement. The macro definition statement (i.e. the macro definition head and the macro definition lines) defines a macro expansion skele- ton, being the basis for a macro expansion invoked by a later macro call. \f A dummy statement has the format: Thus blank lines and comments can be inserted in order to clarify the programming for a human reader. 2_._1_._6_ _ _ _ _ _S_p_e_c_i_a_l_ _I_n_t_e_r_p_r_e_t_a_t_i_o_n_ _o_f_ _-_ _i_n_ _C_o_l_u_m_n_ _1_._ 2.1.6 When, during a normal processing of a line, a - appears in column 1, i.e. the first character position of the line, then it is to- tally blind for the syntactic and semantical analysis of the as- sembly line. However, it has effect on the assembly listing. The listing is controlled by parameters to the call of the assembler and by some assembly directives. The control is done by adjusting so called listing level counters. In general, listing is produced, when counters are ' 0. But when a - is present in column 1, listing is produced only when counters are ' 1. Informally, the effect of putting a - in column 1 is to suppress the listing (of the source text and the object code generated) of that line. It is rather useful within macros, which do a lot of computation or check on its parameters, before the actual use of their values. 2_._2_ _ _ _ _ _ _ _L_i_t_e_r_a_l_s_._ A literal is a character string denoting a value. The macro assembler recognizes the following kind of literals: - integers - longs - reals - strings - fields or field comparisons. \f 2_._2_._1_ _ _ _ _ _I_n_t_e_g_e_r_s_._ 2.2.1 S_y_n_t_a_x_:_ decimal integer'::= digit'... hexadecimal digit'::= digit'ABCDEF hexidecimal radix'::= X> radix'::= digit'> hexadecimal integer'::= hexadecimal radix'hexadecimal digit'... radix integer'::= radix'digit'... decimal integer integer'::= hexadecimal integer' radix integer' E_x_a_m_p_l_e_s_:_ 255 8>377 X>FF 2>11111111 S_e_m_a_n_t_i_c_s_:_ An integer i must be in the range: -16777215 _ i _ 16777215. It denotes the 24 bit integer value being the result of extrac- ting the rightmost 24 bits from i. The digit part, d, of a radix must be in the range 2 _ d _ 9, and the digits forming the radix integer must be less than the radix digit. The value of the hexa- decimal digits, A,..., F are 10,..., 15. \f 2_._2_._2_ _ _ _ _ _L_o_n_g_s_._ 2.2.2 S_y_n_t_a_x_:_ decimal integer' long'::= 0UU+DDDD-UU5 hexadecimal integer' L radix integer' E_x_a_m_p_l_e_s_:_ 27L X>FABCDL 8>4000000000000000L S_e_m_a_n_t_i_c_s_:_ A long l must be in the range: -281474976710655 _ l _ 281474976710655 It denotes the 48 bit value being the result of extracting the rightmost 48 bits from l. 2_._2_._3_ _ _ _ _ _R_e_a_l_s_._ 2.2.3 S_y_n_t_a_x_:_ fraction'::= .decimal integer' exponent part'::= E 0UU+DDDD-UU5 decimal integer' fraction'exponent part' UUreal'::= 0UU+DDDD-UU5 decimal integer' exponent part'DD \f E_x_a_m_p_l_e_s_:_ 1.0 -5.7E-10 6E2 10.50 S_e_m_a_n_t_i_c_s_:_ A real r denotes a 48 bit RC8000 floating point number, i.e. the range of a nonzero real is approximately: -1.6E-616 abs(r) 1.6E616 The number of significant digits in the decimal integer plus the number of digits in the fraction should not exceed 14 digits. 2_._2_._4_ _ _ _ _ _S_t_r_i_n_g_s_._ 2.2.4 S_y_n_t_a_x_:_ any character but " or nl'' string character'::= integer'' symbol'' string'::= "string character'...". E_x_a_m_p_l_e_s_:_ "POP" "12'MY PROGRAMNL'NL'" "" S_e_m_a_n_t_i_c_s_:_ A string character denotes a character value being either - the ordinary value of the character within the alphabet or - the value of the integer enclosed in and ' or - the value of the symbol enclosed in and '. \f A text string is used in some assembly directives in order to ge- nerate consecutive storage words containing the characters of the string, or for other specific purposes. Within an expression, a string denotes an integer value formed as: chDn-2U*2U16D + chDn-1U*2U8D + chDnU where n is the number of string characters comprising the string, and chDiU is the value of the i>th character if 1 _ i _ n else zero. Within an expression, "1'" is equivalent to 1, "1'2'" is equivalent to (1*256+2) and "1'2'3'" is equivalent to ((1*256+2)*256+3). 2_._2_._5_ _ _ _ _ _F_i_e_l_d_s_ _a_n_d_ _F_i_e_l_d_ _C_o_m_p_a_r_i_s_o_n_s_._ S_y_n_t_a_x_:_ field'::= (:character sequence':) field comparison'::= (:character sequence'::character sequence'::) E_x_a_m_p_l_e_s_:_ (:123::123:) (:"0"-48:) (:::SOMETHING:) S_e_m_a_n_t_i_c_s_:_ Within an expression a field denotes an integer value. It is 1 if: - the field has the form of a field comparison and \f - the two character sequences of the field comparison are identi- cal. Otherwise it is zero. This interpretation of the field is useful if, inside a macro, some test of an actual parameter is wanted. Furthermore, formal parameters within macro definitions are fields, and actual parameters may be fields. See chapter 5 for further information. 2_._3_ _ _ _ _ _ _ _N_a_m_e_s_._ 2.3 S_y_n_t_a_x_:_ index part'::= #integer' #symbol' letter' letter' digit' Uuname'::= ...Dd . . index part' letter' digit Uumacro word name'::= < ...Dd . index part' \f E_x_a_m_p_l_e_s_:_ A A7 <ARGCNT MACRO. A#I A#I#J . S_e_m_a_n_t_i_c_s_:_ Names are used for denoting - instruction mnemonics - working or index registers - assembly directives - various operators - macros - sections - the current location counter - user defined symbols Only the first 8 characters of a name are significant. If an index part is present, the index is evaluated, the resul- ting value being either the value of the integer or the value of the symbol. If the value is in the range 0,...,999 it is conver- ted to 3 digits, which are appended to that part of the name al- ready scanned. Thus if I=1 and J=2 then: A001, A#1, and A#I are equivalent names and: B#1#J, B#I#J, and B0010102 are equivalent names. If the value of the indexpart is not in the allowed range, or any of the generated digits are in the insignificant part of the name, then the line is flagged with an I-flag. The macro work names only exist during a macro expansion. They cannot be used outside macros. They provide a tool for defining symbols during a macro expansion, which do not conflict with any normal name. \f 2_._3_._1_ _ _ _ _ _R_e_s_e_r_v_e_d_ _N_a_m_e_s_._ 2.3.1 Some names have been assigned a predefined meaning. They are either global names denoting instruction mnemonics, working- or index registers, assembly directives, various operators, the current location counter or macro work names containing special information about a macro expansion. Appendix C contains a list of all reserved names. 2_._3_._2_ _ _ _ _ _U_s_e_r_ _D_e_f_i_n_e_d_ _N_a_m_e_s_._ 2.3.2 Non reserved names are known as User Defined Names. They are used for defining macros, sections and user defined symbols. 2_._3_._3_ _ _ _ _ _G_l_o_b_a_l_ _N_a_m_e_s_._ 2.3.3 Global names are names, which, when defined, must have the de- fined meaning during all assembly, i.e. they cannot be redefined. Global names are instruction mnemonics, working - or index regis- ters, assembly directives, operators, the location counter, macro names and section names. 2_._3_._4_ _ _ _ _ _L_o_c_a_l_ _N_a_m_e_s_._ 2.3.4 Local names are names which can be redefined. It is a user de- fined symbol, and its scope is defined with respect to the block structure of the program. \f 2_._3_._5_ _ _ _ _ _S_y_m_b_o_l_s_._ 2.3.5 S_y_n_t_a_x_:_ symbol'::= name'macro work name' S_e_m_a_n_t_i_c_s_:_ Throughout this manual, the term symbol is used for a name having a value. Symbols are used as labels, defining some address within the program, as constants defined by a constant assignment, as variables defined by a variable assignment. The location counter symbol (.), has the value of the current location within this section of this module, and section names have a value being the base address of the section. A symbol has certain attributes, the more important are as follows: - relocation attributes: absolute, relocatable, etc. - section attributes (if an address within a section). - current definition state: undefined, fixed assigned, variably assigned, multiple assigned. - external symbol (defined in another module). - value or relative address within a section. Whenever a symbol is used, its attributes are checked against the usage of the symbol, and if any conflict arises, the assembly line is flagged with an error flag. When a symbol is used in a statement before it has been defined, this is known as a forward reference. \f For Example: JL W3, SUBROUT ; CALL SUBROUTINE . . . SUBROUT: The symbol SUBROUT is undefined in pass 1 of the assembler until the label SUBROUT: is scanned. In code generation statement this is fully allowed; however, certain assembly directives do not ac- cept undefined symbols in the argument field. 2_._3_._6_ _ _ _ _ _C_u_r_r_e_n_t_ _L_o_c_a_t_i_o_n_ _C_o_u_n_t_e_r_._ 2.3.6 The symbol . always denotes the relative position of the location counter within the current section. It can only be assigned va- lues using special directives, or implicitly by data generation statements. It may be used as any other symbol within expres- sions. 2_._4_ _ _ _ _ _ _ _E_x_p_r_e_s_s_i_o_n_s_._ 2.4 S_y_n_t_a_x_:_ integer' string' operand'::= field comparison' symbol' (simple expression') \f adding operator'::= +- monadic operator'::= ABS.NOT. dyadic operator'::= */.MOD.' .EQ..NE.GT..GE..LT..LE..REL..SSECT. .RANGE. simple expression'::= adding operator' adding operator' monadic operator' UUoperand'DD dyadic operator' UUoperand' ...DD simple expression' expression'::= P(simple expression') D(simple expression') E_x_a_m_p_l_e_s_:_ 1 -1 X-"0" A .EQ. B NOT. A 1+(A+B)/C ABS.() 123 A .LT. (-A+1) P(A+X) D(SUB) S_e_m_a_n_t_i_c_s_:_ An expression prescribes a computation on the operands involved, in a certain order defined by the priority of the operators in- volved. Use of parantheses may override the order of priority in usual algebraic manner. The result of an evaluation of an expres- sion is primarily a 24 bit integer value; furthermore, section- and relocation attributes of the expression, and perhaps informa- tion about external modifications to be applied to the expres- sion, if external symbols are involved. If, within parantheses, no operands are present, it is interpreted as if a zero was pre- sent. \f 2_._4_._1_ _ _ _ _ _R_e_l_o_c_a_t_a_b_i_l_i_t_y_._ 2.4.1 Any operand in an expression contains section/relocation attri- butes. A constant is always absolute, a symbol may be absolute, resident relocatable, virtual relocatable, or init relocatable. During computation the assembler monitors the relocatability of the intermediate results according to the following general rules: - the intermediate results may denote absolute values, reloca- table values (addresses) or minus relocatable values (minus- addresses). - the final simple expression should be absolute or relocatable. Thus it is possible, for instance, to subtract two relocatable addresses within the same section in order to obtain a distance. It is allowed to ask for equality between any two addresses, and the result is true only when the addresses point to the same place within the same section. In the description of each opera- tor it is described, which combinations of relocatable operands are legal. If the assembler detects a relocation error, the as- sembly line is flagged with an R-flag. 2_._4_._2_ _ _ _ _ _E_x_t_e_r_n_a_l_ _S_y_m_b_o_l_s_._ 2.4.2 Expression may include external symbols, i.e. symbols which are not defined within this module, but should be resolved by a lin- ker. During computation of an expression, the value of such sym- bols are set to zero with no relocation attributes. A simple ex- pression is legal if it consists of a part containing no exter- nals and a sum of external symbols or, if successive use of the associative and commutative rule can bring the expression on the form described above. An expresion is legal, if the simple ex- pression stated in the rule for expression' is legal. \f External modifications to the result of an expression can only be applied to code generated by the assembler. The external symbols may only occur in data generation statements, otherwise the sym- bol is flagged with an X-flag. 2_._4_._3_ _ _ _ _ _O_p_e_r_a_t_o_r_s_._ 2.4.3 Expression operators are listed in table 1. NAME TYPE PRIO FUNCTION + a 5 1+r 1: value to the left of... - a 5 1-r r: value to the right of... * d 6 1*r a: adding operator / d 6 1/r d: dyadic operator .MOD. d 6 1 mod r m: monadic operator d 7 1 shift r ' d 7 1 shift (-r) ABS. m 5 abs(r) NOT. m 5 -r-1 .EQ. d 4 if 1=r then 1 else 0 .NE. d 4 if 1=r then 1 else 0 .GT. d 4 if 1'r then 1 else 0 .GE. d 4 if 1'_r then 1 else 0 .LT. d 4 if 1r then 1 else 0 .LE. d 4 if 1_r then 1 else 0 .REL. d 4 if 1Dre1U=rDre1U then 1 else 0 .SSECT. d 4 if 1DsectU=rDsectU then 1 else 0 .RANGE. d 4 if 0_1r then 1 else 0 .AND. d 3 1 l_o_g_i_c_a_l_-_a_n_d_ r .OR. d 2 1 l_o_g_i_c_a_l_-_o_r_ r .XOR. d 2 1 l_o_g_i_c_a_l_-_x_o_r_ r P(...) spec. 1 pagetable-addr(r) D(...) spec. 1 displacement(r) Table 1, List of Operators. \f +_,_ _A_d_d_i_t_i_o_n_._ Monadic + performs no operation. If one relocatable operand is involved, the result has relocatability as that operand. If both operands are relocatable, they must be opposite, i.e. an address and a minus-address within the same section, and the result is absolute. -_,_ _S_u_b_t_r_a_c_t_i_o_n_._ Monadic - performs two>s complement, i.e. as if a zero preceeded the operator. If one relocatable operand is present, the result has relocatability as that operand (the sign of the relocatabili- ty is changed if it is the second operand). If both operands are relocatable, they must be identical relocatable, and the result is absolute. *_,_ _M_u_l_t_i_p_l_i_c_a_t_i_o_n_._ At most one relocatable operand must be involved, in which case the other operand must be -1, 0 or 1 and the relocability of the result is obvious. /_,_ _D_i_v_i_s_i_o_n_._ Relocatable operands are not allowed. Division by zero is not allowed. Division is always integer division. ._M_O_D_._,_ _R_e_m_a_i_n_d_e_r_ _M_o_d_u_l_o_._ Relocatable operands are not allowed. Modulo zero is not allowed. The sign of the remainder is equal to the sign of the dividend. \f _,_ _L_e_f_t_ _S_h_i_f_t_._ Logical left shift as many times as indicated by the shift a- mount, i.e. the second operand. Relocatable operands are not al- lowed. If the shift amount is negative, right shifts are perfor- med. '_,_ _R_i_g_h_t_ _S_h_i_f_t_._ Logical right shift as many times as indicated by the shift a- mount, i.e. the second operand. Relocatable operands are not al- lowed. If the shift amount is negative, left shifts are perfor- med. A_B_S_._,_ _A_b_s_o_l_u_t_e_ _V_a_l_u_e_._ Relocatable operands are not allowed. N_O_T_._,_ _N_e_g_a_t_i_o_n_._ Relocatable operands are not allowed. Inverts all bits of the value. ._E_Q_._,_ _E_q_u_a_l_ _T_o_._ Relocatable operands are allowed. The result is true (=1) if re- locatability and value are identical, else false (=0). ._N_E_._,_ _N_o_t_ _E_q_u_a_l_ _T_o_._ Relocatable operands are allowed. The result is false (=0) if re- locatability and value are identical, else true (=1). \f ._G_T_._,_ _G_r_e_a_t_e_r_ _T_h_a_n_,_ _a_n_d_ ._G_E_._,_ _G_r_e_a_t_e_r_ _T_h_a_n_ _o_r_ _E_q_u_a_l_ _t_o_,_ _a_n_d_ ._L_T_._,_ _L_e_s_s_ _T_h_a_n_,_ _a_n_d_ ._L_E_._,_ _L_e_s_s_ _T_h_a_n_ _o_r_ _E_q_u_a_l_ _T_o_._ Two identical relocatable operands are allowed. The result is true (=1) if the left side operand is greater than, not less than, less than, or not greater than the right side operand, else false (=0). ._R_E_L_._,_ _R_e_l_o_c_a_t_a_b_l_e_ _A_s_._ True (=1) if the relocatability of two operands are of the same kind, i.e. both absolute, both resident relocatable, both virtual relocatable, or both initrelocatable, else false (=0). ._S_S_E_C_T_._,_ _S_a_m_e_ _S_e_c_t_i_o_n_ _A_s_._ True (=1) if the two operands belong to the same section, else false (=0). ._R_A_N_G_E_._,_ _R_a_n_g_e_ _T_e_s_t_._ Relocatable operands not allowed. The result is true (=1) if the left side operand is not negative and less than the right side operand. ._A_N_D_._,_ _L_o_g_i_c_a_l_ _A_n_d_,_ _a_n_d_ ._O_R_._,_ _L_o_g_i_c_a_l_ _o_r_,_ _a_n_d_ ._X_O_R_._,_ _L_o_g_i_c_a_l_ _E_x_c_l_u_s_i_v_e_ _O_r_._ Relocatable operands not allowed. Performs the boolean function specified, on all 24 bits of the value in parallel. \f P_(_._._._)_,_ _P_a_g_e_ _T_a_b_l_e_ _A_d_d_r_e_s_s_ _O_f_._ The operator must be used in a code generation statement. It adds a P modification to the generated word if the simple expression as argument is a virtual address or contains external references, so that the word finally contains a pointer to the page table en- try for the simple expression. When used on simple expressions which are absolute or resident, the assembler generates a pointer to a word containing the simple expression. As a result of this, data can be accessed using the virtual addressing mode. D_(_._._._)_,_ _D_i_s_p_l_a_c_e_m_e_n_t_ _O_f_._ The operator must be used in a code generation statement. It forces the assembler to compute the displacement relative to the page of its argument, 0, if this argument is resident or abso- lute. If this argument contains externals, information is passed to the linker. \f Example 2, Various Operators. \f 2_._5_ _ _ _ _ _ _ _P_o_o_l_ _A_d_d_r_e_s_s_e_s_._ 2.5 S_y_n_t_a_x_:_ expression' pool address'::= = long' real' E_x_a_m_p_l_e_s_:_ =-7.0 =A+B =P(SUBROUT) =SINUS+COS S_e_m_a_n_t_i_c_s_:_ A pool address is an address computed by the assembler which points to a word containing an expression, or to the last word of a double word containing a long or real literal. It may be used when you do not want to side aside space for constants, refe- rences etc. The assembler collects all these words in a pool which is output at the end of the section containing the references to the pool. You may empty the current contents of the pool of the current section anywhere in the code by using the POOL. statement. Pool addresses are useful within macros, because you can address data by its contents rather than by the location of a known copy. The assembler does some work in order to overlap data in a pool, when possible, e.g. only one copy of any constant exists within the same pool. \f SIGN: DL F01, =1.0 ; SIGN RL W3, CHAR ; SGN:= SE W3, "+" ; IF CHAR = "+" DL F01, =-1.0 ; THEN 1.0 DS F01, SGN+2 ; ELSE -1.0; JL *=NEXTCHAR ; GOTO NEXTCHAR; Example 2, Use of Pool Addresses. 2_._6_ _ _ _ _ _ _ _L_a_b_e_l_s_ _a_n_d_ _L_a_b_e_l_ _A_s_s_i_g_n_m_e_n_t_s_._ 2.6 S_y_n_t_a_x_:_ label'::= symbol' label assignment'::= label': ... E_x_a_m_p_l_e_s_:_ A: A:B: THISPLACE: S_e_m_a_n_t_i_c_s_:_ A label assignment is used to assign the value of the current location counter to a symbol, known as the label. The label as- signment is a fixed assignment, i.e. the symbol cannot be assig- ned another value later. A label assignment is equivalent to se- ries of constant assignments: label' = . \f 2_._7_ _ _ _ _ _ _ _C_o_n_s_t_a_n_t_s_ _a_n_d_ _C_o_n_s_t_a_n_t_ _A_s_s_i_g_n_m_e_n_t_s_._ 2.7 S_y_n_t_a_x_:_ constant'::= symbol' constant assignment'::= label assignment' constant' = simple expression' E_x_a_m_p_l_e_s_:_ CUR= 66 NEXT= 0 PREV= NEXT+2 S_e_m_a_n_t_i_c_s_:_ A constant assignment is used to assign a value to a symbol, known as a constant. The constant assignment is a fixed assign- ment, i.e. the symbol cannot be assigned another value later. Usually constant assignments are used for naming fields in re- cords, and the value is the address relative to the record base. Then the fields can be accessed as: RL W3, X3+PREV ; GET PREVIOUS RECORD RL W1, X3+IDENT ; W1:= IDENT; A constant assignment may contain one level forward references. \f 2_._8_ _ _ _ _ _ _ _V_a_r_i_a_b_l_e_s_ _a_n_d_ _V_a_r_i_a_b_l_e_ _A_s_s_i_g_n_m_e_n_t_s_._ 2.8 S_y_n_t_a_x_:_ variable'::= symbol' variable assignment'::= label assignment' variable':= simple expression' E_x_a_m_p_l_e_s_:_ I:= I+1 COUNT:=COUNT .MOD. MAXCOUNT + 1 S_e_m_a_n_t_i_c_s_:_ A variable assignment is used to assign a value to a symbol known as a variable. A variable is undefined in all passes until it is assigned for the first time. It keeps the value until the next variable assignment of the symbol. At the end of each pass it be- comes undefined again. Variables are generally used for compile time purposes. Combined with the index part feature of symbols, variables can be used for generation of arrays of complicated structures: I:= 0 ; DO. N ; GENERATE N INCARNATIONS OF... I:=I+1 ; A#I: DATA. B#I ; INCARNATION NO. I . . . ENDC. ; A variable assignment must not contain forward references. \f 2_._9_ _ _ _ _ _ _ _B_l_o_c_k_s_ _a_n_d_ _S_c_o_p_e_s_._ 2.9 An assembly program begins at the first BEGIN. at terminates at the corresponding END. startaddress' Between these two lines, several BEGIN./END. pairs may be pre- sent, both parallel blocks and nested blocks are permitted. The scope of name is usually all program, but the scope of sym- bols may be limited to a certain block by means of declarations, the DECLARE. statement. The scope rules are illustrated in the following example. Note that in order to have the same scope rule for pass1 and pass2, the scope of a locally declared symbol is: from the line of de- claration to the matching END. and not: from the BEGIN. to the matching END.. \f BLOCKS SCOPES BEGIN. AD1U_ AD2U_ BD1U_ BD2U_ C A: BEGIN. DECLARE. A,B A: B: END. BEGIN. DECLARE. B B: C: END. END. Example 4, Blockes and Scopes. 2_._1_0_ _ _ _ _ _ _S_e_c_t_i_o_n_s_._ 2.10 All code and data of the assembler program is grouped into sec- tions. Each section represents a unit of generated code. During the coding of a program it is possible to switch to any section, usually to the top of the section, in order to add some code or data to that section. Thus the code can be grouped into physi- cally consecutive units which necessarily are not textually con- secutive. Especially within macros, it is useful to be able to put aside some data in another section while generating instruc- tions in one section in order to avoid mixing of data and code, thus causing generation of superfluous jumps around data. Furt- hermore, sections are used to define pages of virtual code, i.e.\f units of code, which are brought into core in one operation, by the paging system. From the programmers point of view, the assembler offers in each assembler module an infinite number of resident sections, an in- finite number of virtual sections (pages), an infinite number of common sections, one absolute section and one init section. The different types of sections are explained more detailed be- low. 2_._1_0_._1_ _ _ _ _A_b_s_o_l_u_t_e_ _S_e_c_t_i_o_n_._ 2.10.1 The absolute section contains code placed in the RC8000 from lo- cation 0 and upwards. User programs cannot generate code in the absolute section, when the standard system loader is used, but the absolute section provides for a convenient way of defining official entry points in the monitor. 2_._1_0_._2_ _ _ _ _R_e_s_i_d_e_n_t_ _S_e_c_t_i_o_n_s_._ 2.10.2 The resident sections contain code which can be relocated in the job process. Resident sections are placed consecutively after each other starting at the beginning of the job process. Usually the first resident section of a program is a section defining of- ficial entry points in the File Processor, which usually is resi- dent during the total lifetime of the job process. 2_._1_0_._3_ _ _ _ _V_i_r_t_u_a_l_ _S_e_c_t_i_o_n_s_._ 2.10.3 The virtual sections contain code residing in a virtual memory. Each virtual section resides on one or more backing storage seg- ments of a file. A paging system takes care of the administration of transports of virtual sections to or from core. \f 2_._1_0_._4_ _ _ _ _I_n_i_t_ _S_e_c_t_i_o_n_._ 2.10.4 The init section contains code which is executed once at the be- ginning of the program. It is overwritten by pages of the pro- gram. 2_._1_0_._5_ _ _ _ _C_o_m_m_o_n_ _S_e_c_t_i_o_n_s_._ 2.10.5 The common sections contain data (and code). The contents of com- mon sections is partially defined within the module, and the fi- nal position and size is defined by the linker, by comparing com- mon sections of all modules taking part in the link process. \f 3_._ _ _ _ _ _ _ _ _I_N_S_T_R_U_C_T_I_O_N_ _S_T_A_T_E_M_E_N_T_S_._ 3. This chapter describes how to write RC8000 instructions in MACRO assembly language. Consult ref. 1 for a complete description of the RC8000 computer hardware. 3_._1_ _ _ _ _ _ _ _D_a_t_a_ _a_n_d_ _I_n_s_t_r_u_c_t_i_o_n_ _F_o_r_m_a_t_s_._ 3.1 3_._1_._1_ _ _ _ _ _D_a_t_a_ _F_o_r_m_a_t_s_._ 3.1.1 The data structure of the RC8000 is shown in the following fi- gure: \f The basic arithmetic or logical operand is an integer of 24 bits. Two>s complement arithmetic is used. Data is packed with two halfwords per word. The 12-bit halfwords are directly address- able. The address of the first halfword is 0, the next is 1 and etc. Doublewords are used to represent integers of 48 bits and floating-point numbers with 36-bit fractions and 12-bit expo- nents. If a doubleword/word/halfword is treated as a number, the left- most bit is the sign. If a doubleword is treated as a floating point number, the first bit in both fraction and exponent are treated as the signs. The alignment of words in store is always such that the effective address is divisible by 2. Therefore the effective address, in word instruction, is the address if the left-hand halfword. An odd address in word instruction will be treated as if the corre- sponding left-hand halfword address had been used. 3_._1_._2_ _ _ _ _ _W_o_r_k_i_n_g_ _R_e_g_i_s_t_e_r_s_._ 3.1.2 The register structure includes four 24-bit working registers, one of which is specified as the result register in each instruc- tion. Three of the working registers also function as index re- gisters. The current index register is selected by the instruc- tion format. The working registers are addressable as the first eight half- words (or four words) of the primary memory. The programmer can therefore perform operations directly between two registers by specifying a memory address between 0 and 7. \f A_d_d_r_e_s_s_s_ W_o_r_k_i_n_g_ _R_e_g_i_s_t_e_r_ I_n_d_e_x_ _R_e_g_i_s_t_e_r_ 0 W0 2 W1 X1 4 W2 X2 6 W3 X3 Two adjacent working registers can be used to hold a doublelength operand of 48 bits. In doublelength operations, the four regis- ters are connected cyclically as follows: D_o_u_b_l_e_ _R_e_g_i_s_t_e_r_ C_o_r_r_e_s_p_o_n_d_s_ _t_o_ W30, F30 W3 concatenated W0 W01, F01 W0 concatenated W1 W12, F12 W1 concatenated W2 W23, F23 W2 concatenated W3 3_._1_._3_ _ _ _ _ _I_n_s_t_r_u_c_t_i_o_n_ _F_o_r_m_a_t_._ 3.1.3 The instruction format is divided into an operation halfword and an address halfword, each containing 12 bits: F W M X D 0 5 6 7 8 9 10 11 12 23 Example: The instruction: AL W3, 7 will load working register 3 with the number 7, i.e. the contents of W3 is now 7. The mapping of this instruction in a primary storage word is: \f F W M X D 11 3 0 0 7 Bits (0:5) F_ _f_i_e_l_d_. Contains the function code, specifying one of sixty-four basic operations. Bits (6:7) W_ _f_i_e_l_d_. Specifies one of the four working regis- ters as the result register. Bits (8:9) M_ _f_i_e_l_d_. Specifies one of four address modes, used to control generation of the effective address (see below). Bits (10:11) X_ _f_i_e_l_d_. Selects the current index register. Only working registers W1, W2, and W3 act as index re- gisters (X field = 0 indicates no indexing). Bits (12:23) D_ _f_i_e_l_d_. Contains a truncated address, specifying a displacement from -2048 to +2047 halfwords with- in the program. This is adequate for the majority of addresses, but nor sufficient for direct add- ressing of the entire memory. A full address of 24 bits is formed by means of the displacement, D, in conjunction with the contents of an index register, X, and the contents of the instruction counter, IC. The generation of the effective address, A, is controlled by the address mode field, M, as follows: M = 00 A = X + D direct addressing M = 01 A = word (X + D) indirect addressing M = 10 A = X + IC + D relative addressing M = 11 A = word (X + IC + D) indirect relative addressing \f In the address calculation, the displacement is treated as a 12 bit signed integer that is extended towards the left to 24 bits before being added to the index register and the instruction counter. In the final addition of X, IC and D, overflow is ig- nored. The address modes 01 and 11 permit indirect addressing on one le- vel. The indirect address fetched from the memory is assumed to be a full address of 24 bits. The address modes 10 and 11 modify the indexed displacement with the address of the instruction. 3_._1_._4_ _ _ _ _ _U_s_e_ _o_f_ _E_f_f_e_c_t_i_v_e_ _A_d_d_r_e_s_s_._ 3.1.4 For some function codes the effective address is used directly as an operand. This is done in three different ways. The effective address or its two>s complement can be assigned to the addressed register. The contents of the working register can be compared with the ef- fective address (word comparison) in several ways, the result of the comparison determining whether the following instruction is to be executed or skipped. The effective address can define a number of shifts to be perfor- med on the addressed register. For other function codes, the effective address is used to refer to memory locations. Memory addresses is always expressed as halfword addresses. The halfword locations are numbered consecutively starting with zero.\f In word operations, the rightmost bit in the effective address is ignored; thus it is irrelevant whether a word operation refers to the left or the right half of a word. In doubleword operation the rightmost bit in the effective address is also ignored; the word thus specified is the second word of the operand. 3_._2_ _ _ _ _ _ _ _I_n_s_t_r_u_c_t_i_o_n_ _S_t_a_t_e_m_e_n_t_ _F_o_r_m_a_t_._ 3.2 S_y_n_t_a_x_:_ instruction'::= wreg' opcode' wreg', * pool address' xreg'0UU+DDDD-UU5ession' expr opcode'::= ALRLJLAMRSSHSLSESN JDHLHSDLDSZLELEAES WAWSLALOLSLDSOSZ ACRXXLXSWMWDAASSCICF FAFSFMFDLXASADNSNDSXSP REJEGPRIGGKSDODI wreg'::= W0W1W2W3 W30W01W12W23 F30F01F12F23 xreg'::= X1X2X3 instruction statement'::= label assignment' instruction' \f E_x_a_m_p_l_e_s_:_ AL W0, 7 ; W0:=7 RL W0, =7913 ; W0:=7913 FM F01, =3.1416 ; F01:=F01*3.1416 WA W3, W0 ; W3:= W3+W0 RL W3, *=P(SUB) ; CALL VIRTUAL JL W3, X3+D(SUB) ; SUBROUTINE AM *W2 ; MODIFY WITH W2 JL SUBROUT ; SUBROUTINE CALL S_e_m_a_n_t_i_c_s_:_ The opcode selects an RC8000 instruction which is placed in the F field in the instruction. If a wreg is present in the wreg field, it is used to assign the W-field of the instruction. Note that the three lines in the definition of wregs denotes the same con- stants of W-field, but for the human reader the last two lines visualize both registers in effect. The indirect bit is set if an asterisk (*) is present in the instruction in the beginning of the displacement field. The X-field is set if an xreg is present. In the displacement field the wreg denotes core location 0, 2, 4 and 6 respectively. Finally the pool address or expression is evaluated. If it results in a relocatable address within the current section, the relative bit is inserted in the M-field of the instruction and the current location counter is subtracted from the expression. Finally the 12 bit displacement is inserted and the instruction word is generated together with possible address modification. Errors in the expression or halfword overflow is flagged. A dis- placement value d in the range -2048_d2048 is accepted, for jd- instructions, however, -2048_d4096. In all cases, only the 12 rightmost bits are put in the D-field. Externals are allowed in the displacement, and so is the displacement operator, D. \f 3_._3_ _ _ _ _ _ _ _A_d_d_r_e_s_s_i_n_g_ _M_o_d_e_s_._ 3.3 When addressing code or data within a running program, different addressing modes may be used; the relative addressing mode, the resident addressing mode, or the virtual addressing mode. 3_._3_._1_ _ _ _ _ _R_e_l_a_t_i_v_e_ _A_d_d_r_e_s_s_i_n_g_ _M_o_d_e_._ 3.3.1 The relative addressing mode is used, when addressing objects within the same section (resident or virtual). A jump to a label LAB may be coded: JL LAB ; GOTO LAB; or AM *=LAB-2-. ; GOTO LAB; JL . ; depending on, whether the distance to LAB can be held in the dis- placement field or not. 3_._3_._2_ _ _ _ _ _R_e_s_i_d_e_n_t_ _A_d_d_r_e_s_s_i_n_g_ _M_o_d_e_._ 3.3.2 The resident addressing mode is often used when addressing resi- dent objects, and it can be used when addressing virtual objects. A jump to a label LAB may be coded: JL *=LAB ; GOTO LAB \f 3_._3_._3_ _ _ _ _ _V_i_r_t_u_a_l_ _A_d_d_r_e_s_s_i_n_g_ _M_o_d_e_._ 3.3.3 The virtual addressing mode should be used when addressing vir- tual objects, and it can be used when addressing resident ob- jects. A jump to a label LAB may be coded: AM *=P(LAB) ; GOTO LAB; AM *0 ; JL D(LAB) ; The assembler generates a stepping stone containing P(LAB), which at run time points to a word containing: - a pointer to a word containing the address of LAB, if LAB is resident, in which case D(LAB) is assembled as 0. Or - a pointer to a page table entry if LAB is virtual. The page table entry will contain an absolute address P>(LAB), so that P>(LAB)+D(LAB) is the absolute address of LAB. This, if the section has already been brought into core. Otherwise an inter- rupt is provoked, and the paging system transfers the section into core and sets P>(LAB) properly. The set up of page table and computation of correct address is done partly by the assembler, partly by the linker and partly by the loader. \f 4_._ _ _ _ _ _ _ _ _A_S_S_E_M_B_L_Y_ _D_I_R_E_C_T_I_V_E_ _S_T_A_T_E_M_E_N_T_S_._ 4. Assembly directives are used for various purposes. They control the assembly process and supply necessary and optional informa- tion about the program, how to scan the input files, how to gene- rate the object code, and how to list all or selected parts of the program. In this chapter all directives are described alphabetically. Some assembly directive statement may be preceeded by label as- signments. In this case the syntax description begins with an l' denoting the optional label assignment. If no l' is present, it is not allowed to put a label on that line. \f 4_._1_ _ _ _ _ _ _ _A_S_E_C_T_._ _A_b_s_o_l_u_t_e_ _S_e_c_t_i_o_n_._ 4.1 S_y_n_t_a_x_:_ ASECT. expression' E_x_a_m_p_l_e_:_ ASECT. ; DEFINITION OF ENTRY POINTS IN BLKH. 66 ; MONITOR... CUR: BLK. 1 ; CUR = 66 ... S_e_m_a_n_t_i_c_s_:_ Selects the absolute section. The current location counter is set to the current top of the absolute section. Normally, no module contains ASECT. code, but a library module may contain a shadow monitor, i.e. it contains external definitions for important en- tries in the monitor. Modules containing ASECT. code cannot be loaded by the standard system loader. The ASECT. statement may contain an expression denoting an inte- ger value. If present, the value must be correct in the sense that a zero value means reselection of any previous absolute sec- tion, and a nonzero value means entering a new absolute section. Thus, only the first ASECT. statement may contain a nonzero ex- pression. \f 4_._2_ _ _ _ _ _ _ _B_E_G_I_N_._ _B_e_g_i_n_ _o_f_ _B_l_o_c_k_._ 4.2 S_y_n_t_a_x_:_ l' BEGIN. E_x_a_m_p_l_e_:_ BEGIN. ; BEGIN OF BLOCK DECLARE. A1,A2,A3,A4 ; DECLARE LOCAL SYMBOLS ... ; AND USE THEM END. ; END OF BLOCK S_e_m_a_n_t_i_c_s_:_ Begins a new block, thus enabling declarations of local symbols. The use of BEGIN. should not be too frequent, as it involves rat- her time consuming code in the assembler in order to check scope rules etc., i.e. do not let macros declare blocks if not necessary; use macro work names in stead. The total number of blocks in an assembly program is limited, depending on the process size. Blocks may be nested, up to 10 levels are allowed. All source lines before the first BEGIN. statement are skipped by the assembler. The first BEGIN. statement must not be preceeded by a label assignment. \f 4_._3_ _ _ _ _ _ _ _B_L_K_._ _B_l_o_c_k_ _o_f_ _W_o_r_d_s_._ 4.3 S_y_n_t_a_x_:_ l' BLK. expression',expression' E_x_a_m_p_l_e_s_:_ BLK. 256 ; RESERVE SPACE FOR BUFFER BLK. 100,0 ; SET 100 WORDS TO ZERO S_e_m_a_n_t_i_c_s_:_ The first expression must denote an integer value, s, with 0s50000; forward references are not allowed. The second expres- sion, if present, must denote any integer value, v. If only one expression is present, the location counter is in- creased by 2*s, thus skipping a block of s words. Otherwise, the s words are initialized to v. \f 4_._4_ _ _ _ _ _ _ _B_L_K_H_._ _B_l_o_c_k_ _o_f_ _H_a_l_f_w_o_r_d_s_._ 4.4 S_y_n_t_a_x_:_ l' BLKH. expression',expression' E_x_a_m_p_l_e_s_:_ BLKH. 512 ; RESERVE SPACE FOR BUFFERS BLKH. 200,0 ; SET 200 HALFWORDS TO ZERO S_e_m_a_n_t_i_c_s_:_ The first expression must denote an integer value, s, with 0s100000; forwards references are not allowed. The second ex- pression, if present, must denote an integer value, v, with -2048_v4096. If only one expression is present, the location counter is in- creased by s + s mod 2, thus skipping a block of s + s mod 2 halfwords. Otherwise the s halfwords are initialized to a value being the 12 rigthmost bits of v. \f 4_._5_ _ _ _ _ _ _ _C_O_P_Y_._ _C_o_p_y_ _f_r_o_m_ _S_o_u_r_c_e_ _F_i_l_e_._ 4.5 S_y_n_t_a_x_:_ l' COPY. string' E_x_a_m_p_l_e_:_ COPY. "MYFILE" S_e_m_a_n_t_i_c_s_:_ Forces the assembler to include a source file in the source file stream, just after the source line containing the COPY. state- ment. The string contains the name of the file to be included. The assembler continues reading from the file until an end medium character is read or until an EOF. statement is scanned. After all file has been read, the assembler continues reading from the source file containing the invoking COPY. statement. The invoked copy-file may contain COPY. statements itself etc. up to any level of copying. \f 4_._6_ _ _ _ _ _ _ _C_S_E_C_T_._ _C_o_m_m_o_n_ _S_e_c_t_i_o_n_._ 4.6 S_y_n_t_a_x_:_ CSECT. section name' E_x_a_m_p_l_e_s_:_ CSECT. A ; IN FORTRAN: BLK. 2 ; COMMON/A/X,Y,Z DATA. 1.0,9.25 ; DATA Y,Z/1.0,9.25 CSECT. BLANKCOM ; BLANK COMMON: DATA. 1,VAL1,VAL2 ; S_e_m_a_n_t_i_c_s_:_ Selects a named common section. The current location counter is set to the current top of the common section. You cannot make references directly to objects within a common section, however, the common section name is an external refe- rence, which at link time points to the base of the common area. So objects may be addressed as section name' + relative within common area. A common area may contain integers and relocatable addresses. \f 4_._7_ _ _ _ _ _ _ _D_A_T_A_._ _D_a_t_a_ _G_e_n_e_r_a_t_i_o_n_._ 4.7 S_y_n_t_a_x_:_ expression' expression' pool address' pool address' Uul' DATA. Ddlong' Uu,Dd long' Uu...Dd real' real' E_x_a_m_p_l_e_s_:_ DATA. XYZ+ABC,= P(SUB),X>FFL DATA. -1E+1,= 1.0,P(SUB1),"0" S_e_m_a_n_t_i_c_s_:_ Generates one or more data words containing the value of expres- sions, pool addresses, i.e. pointers to data, long or real lite- rals. If a string is argument to the DATA. statement, it is a part of the expression, and thus one data word is generated ac- cording to the rules for strings in expression. \f 4_._8_ _ _ _ _ _ _ _D_A_T_A_H_._ _D_a_t_a_ _G_e_n_e_r_a_t_i_o_n_ _i_n_ _H_a_l_f_w_o_r_d_s_._ 4.8 S_y_n_t_a_x_:_ l' DATAH. expression',expression'... E_x_a_m_p_l_e_s_:_ DATAH. XYZ,ABC,4095 DATAH. -1,0 S_e_m_a_n_t_i_c_s_:_ Generates one or more halfwords containing the value of the ex- pressions. The expression must denote absolute values, but exter- nals are allowed in the expression. The value, h, of the expres- sion must be in the range -2048_h4096. If an odd number of ex- pressions is present in a DATAH. statement, a halfword containing a zero is generated in the slack halfword. \f 4_._9_ _ _ _ _ _ _ _D_E_C_L_A_R_E_._ _D_e_c_l_a_r_a_t_i_o_n_ _o_f_ _L_o_c_a_l_ _S_y_m_b_o_l_s_._ 4.9 S_y_n_t_a_x_:_ l' DECLARE. symbol',symbol'... E_x_a_m_p_l_e_:_ DECLARE. A1,A2,WRK1,WRK2 S_e_m_a_n_t_i_c_s_:_ Declares one or more symbols as a local symbol. No symbol must be declared more than once in each block, and no symbol must be glo- bal, like for instance a macro name. The scope of the symbol is from the point of declaration up the end of the block containing the DECLARE. statement. Redefinition of a symbol occurs if a sym- bol already exists in a surrounding block. The previous attri- butes of the symbol are then pushed on the redefinition stack. \f 4_._1_0_ _ _ _ _ _ _D_E_F_._ _D_e_c_l_a_r_a_t_i_o_n_ _o_f_ _E_x_t_e_r_n_a_l_ _D_e_f_i_n_i_t_i_o_n_s_._ 4.10 S_y_n_t_a_x_:_ l' DEF. symbol',symbol'... E_x_a_m_p_l_e_:_ DEF. SIN,COS . . . SIN: . . . COS: S_e_m_a_n_t_i_c_s_:_ Declares one or more symbols as external definitions, i.e. the value of the symbol is exported to other modules during the link process, so that the symbol can be used within other modules as an external symbol. The DEF. statement itself does not assign any value to the symbol. \f 4_._1_1_ _ _ _ _ _ _D_O_._ _R_e_p_e_t_i_t_i_o_n_ _o_f_ _S_o_u_r_c_e_ _L_i_n_e_s_._ 4.11 S_y_n_t_a_x_:_ DO. expression' E_x_a_m_p_l_e_:_ COUNT:= 0 ; GENERATION OF 5 WORDS DO. 5 ; CONTAINING 1,4,9,16,25 COUNT:= COUNT+1 DATA. COUNT*COUNT ENDC. S_e_m_a_n_t_i_c_s_:_ Causes repetition of source program lines, the number of times specified by the expression. The expression must denote an abso- lute value; forward references are not allowed. If the value of the expression is positive, it denotes the number of repetitions. If the number is zero or negative, the statement works as the statement IF. 0, i.e. a conditional skip of source lines. The source lines repeated are from the line following the DO. state- ment up to and including the line containing the corresponding ENDC. statement. Usually, only the first repetition is shown on the listing, i.e. the listing level counters, SRC and OBJ are decreased after the first repetition and increased after the ter- mination of the DO. statement. This general rule may be overwrit- ten by stating the parameter dolist.yes to the call of the assem- bler. Locally, the listing can be controlled using the LISTON./ LISTOFF. statements. A DO. statement in a source file and the corresponding ENDC. statement must be contained in the same file. \f A DO. statement in a macro definition and the corresponding ENDC. statement must be contained in the same macro. Any nesting of DO., IF., and IFN. statements are permitted up to some implementation defined limit. Do not use DO. statements to zerofill a block of words or the like, if you can use the BLK. statement. The DO. statement takes more time during the assembly. \f 4_._1_2_ _ _ _ _ _ _E_N_D_._ _E_n_d_ _o_f_ _B_l_o_c_k_._ 4.12 S_y_n_t_a_x_:_ l' END. expression' E_x_a_m_p_l_e_:_ BEGIN. ; BEGIN OF PROGRAM . STRT: . . BEGIN. ; BEGIN LOCAL BLOCK . . . END. ; END LOCAL BLOCK . . . END. STRT ; END OF PROGRAM S_e_m_a_n_t_i_c_s_:_ Terminates a block, and signals the logical end of the program if it corresponds to the first BEGIN. of the program. The last END. may contain an expression, which is the starting address for the program, if any. Any symbols redefined inside the terminated block are popped off the redefinitin stack, so that these symbols again can be used. \f If the assembler detects that an END. statement is missing, it generates the following statement: END. ; GENERATED BY ASSEMBLER and flags it with an S-flag. \f 4_._1_3_ _ _ _ _ _ _E_N_D_C_._ _E_n_d_ _o_f_ _C_o_n_d_i_t_i_o_n_a_l_ _A_s_s_e_m_b_l_y_._ 4.13 S_y_n_t_a_x_:_ ENDC. E_x_a_m_p_l_e_:_ DO. 5 IF. (I .MOD. 2) .EQ. 0 DATA. I IFF. DATA. -I ENDC. ; END OF IF. STATEMENT I:=I+1 ENDC. ; END OF DO. STATEMENT S_e_m_a_n_t_i_c_s_:_ Terminates an IF., IFN., or DO. statement. ENDC. always works as a terminator for the innermost conditional assembly statement. If the assembler detects that an ENDC. is missing, it generates the following statement: ENDC. ; GENERATED BY ASSEMBLER and flags it with an S-flag. \f 4_._1_4_ _ _ _ _ _ _E_O_F_._ _E_n_d_ _o_f_ _S_o_u_r_c_e_ _F_i_l_e_._ 4.14 S_y_n_t_a_x_:_ EOF. E_x_a_m_p_l_e_:_ prog = macro input input BEGIN ; START OF FIRST SOURCE FILE . . . EOF. ; END OF FIRST SOURCE FILE ; START OF SECOND SOURCE FILE . . . END. STRT ; END OF PROGRAM EOF. ; END OF SECOND SOURCE FILE scope user prog finis S_e_m_a_n_t_i_c_s_:_ The EOF. statement works as the physical end of a source file. It may be put as the last statement on disc files for commentary purposes. It must be present as the last statement of a source file residing on current input. If several files reside on cur- rent input, each file must be terminated by an EOF. statement. \f 4_._1_5_ _ _ _ _ _ _E_R_R_O_R_._ _E_r_r_o_r_ _M_e_s_s_a_g_e_._ 4.15 S_y_n_t_a_x_:_ l' ERROR. expression' E_x_a_m_p_l_e_:_ ERROR. <ARGCNT ; TOO MANY ARGUMENTS S_e_m_a_n_t_i_c_s_:_ Causes the line to be output on the message file, flagged with an asterisk *. If the expression is present, the value is listed in the margin of the listing. The statement should be used to output errors during assembly detected by the program itself, i.e. inva- lid parameters to macros etc. \f 4_._1_6_ _ _ _ _ _ _F_P_L_A_B_E_L_._ _F_i_l_e_ _P_r_o_c_e_s_s_o_r_ _L_a_b_e_l_._ 4.16 S_y_n_t_a_x_:_ l' FPLABEL. S_e_m_a_n_t_i_c_s_:_ Indicates that this module is the File Processor Module, i.e. the module containing the File Processor entries. The module is al- ways placed in the beginning of the process and it contains no code, as the File Processor is present before the loading is ini- tiated. \f 4_._1_7_ _ _ _ _ _ _I_F_._ _ _ _I_f_._ 4.17 S_y_n_t_a_x_:_ IF. expression' E_x_a_m_p_l_e_:_ IF. A .NE. B ; IF A NOT EQUAL TO B DATA. 1,2 ; THEN GENERATE 1,2 ENDC. ; S_e_m_a_n_t_i_c_s_:_ Causes conditional skip of source program lines. The expression must denote an absolute value; no forward references are allowed. If the last bit of the value is 0, the current condition is set to false, else it is set to true. If the current condition is true, source lines are processed normally up to any corresponding IFT., IFF., IFTF., or ENDC. statement, else these source lines are skipped. Usually, when lines are skipped, the listing is sup- pressed, i.e. the listing level counters SRC and OBJ are decrea- sed at the start of the skipping and increased at the end of the skipping. This general rule may be overwritten by stating the parameter cdlist.yes to the call of the assembler. Locally the listing can be controlled using the LISTON./LISTOFF. statements. An IF. statement in a source file and the corresponding ENDC. statement must be contained in the same file. An IF. statement in a macro definition and the corresponding ENDC. statement must be contained in the same macro. Any nesting of IF., IFN., and DO. statements are permitted up to some implementation defined limit. \f 4_._1_8_ _ _ _ _ _ _I_F_F_._ _ _ _I_f_ _F_a_l_s_e_._ 4.18 S_y_n_t_a_x_:_ IFF. E_x_a_m_p_l_e_:_ IF. A .GT. 0 ; IF A'0 DATA. 1 ; GENERATE 1 IFF. ; ELSE DATA. 2 ; GENERATE 2 ENDC. ; S_e_m_a_n_t_i_c_s_:_ Causes normal processing of source program lines if the current condition, set by the corresponding IF. or IFN. statement is false. If the current condition is true, source lines are skipped. The rules for conditional skipping are as for the IF. statement. \f 4_._1_9_ _ _ _ _ _ _I_F_N_._ _ _ _I_f_ _N_o_t_._ 4.19 S_y_n_t_a_x_:_ IFN. expression' E_x_a_m_p_l_e_:_ IFN. A .EQ. B ; IF NOT (A=B) DATA. 1,2 ; GENERATE 1,2 ENDC. ; S_e_m_a_n_t_i_c_s_:_ Causes conditional skip of source program lines. The expression must denote an absolute value; no forward references are allowed. If the last bit of the value is 0, the current condition is set to false, else it is set to true. If the current condition is true, source lines are skipped up to any corresponding IFT., IFF., IFTF., or ENDC. statement, else source lines are processed normally. The rules for conditional skipping are as for the IF. statement. \f 4_._2_0_ _ _ _ _ _ _I_F_T_._ _ _ _I_f_ _T_r_u_e_._ 4.20 S_y_n_t_a_x_:_ IFT. E_x_a_m_p_l_e_:_ IF. A. .GE. 0 ; IF A'= 0 DATA. 1 ; GENERATE 1 IFF. ; ELSE DATA. 2 ; GENERATE 2 IFT. ; IF (A'=0) WAS TRUE DATA. 3 ; GENERATE 3 TOO ENDC. ; S_e_m_a_n_t_i_c_s_:_ Causes normal processing of source program lines if the current condition, set by the corresponding IF. or IFN. statement is true. If the current condition is false, source lines are skipped. The rules for conditional skipping are as for the IF. statement. \f 4_._2_1_ _ _ _ _ _ _I_F_T_F_._ _ _ _I_f_ _T_r_u_e_ _o_r_ _F_a_l_s_e_._ 4.21 S_y_n_t_a_x_:_ IFTF. E_x_a_m_p_l_e_:_ IF. OLDVERS ; IF OLD VERSION AL W1, X1+2 ; INCREASE POINTER BEFORE USE IFTF. ; UNCONDITIONALLY RL W0, X1 ; W0:= WORD (POINTER) IFF. ; IF NEW VERSION AL W1, X1+2 ; INCREASE POINTER AFTER USE ENDC. S_e_m_a_n_t_i_c_s_:_ Causes normal processing of source lines, whether or not the cur- rent condition set by the corresponding IF. or IFN. statement is true or false. The normal processing continues up to the next corresponding IFF., IFT., IFTF., or ENDC. statement. \f 4_._2_2_ _ _ _ _ _ _I_S_E_C_T_._ _ _ _I_n_i_t_ _S_e_c_t_i_o_n_._ 4.22 S_y_n_t_a_x_:_ ISECT. expression' S_e_m_a_n_t_i_c_s_:_ Selects the init section. The location counter is set to the cur- rent top of the init section. The code in the init section is en- tered just before the normal program entry and can be used to fetch important information before the program starts. The init code should be coded position independent, i.e. you can only re- ference objects within the init section and only by using rela- tive addressing. The init section is loaded "somewhere" and it is overwriten by program pages, when the program is running. Within the init section you can access objects within the resident sec- tions, and certain paging system procedures are available. The ISECT. statement may contain an expression denoting an inte- ger value. If present, the value must be correct in the sense that a zero value means reselection of any previous init section and a nonzero value means entering a new section. Thus, only the first ISECT. statement may contain a nonzero expression. \f 4_._2_3_ _ _ _ _ _ _L_I_S_T_O_F_F_._ _ _ _L_i_s_t_i_n_g_ _L_e_v_e_l_ _D_e_c_r_e_a_s_e_._ 4.23 S_y_n_t_a_x_:_ l' LISTOFF. option',option'... option'::= SRCOBJ E_x_a_m_p_l_e_:_ LISTOFF. ; DECREASE SRC AND OBJ LISTOFF. SRC ; DECREASE SRC ONLY S_e_m_a_n_t_i_c_s_:_ The assembler contains two listing level counters, SRC and OBJ. At the beginning of the assembly process these counters are ini- tialized to 1, except when the list.all parameter is stated to the call of the program. When SRC is not positive, listing of as- sembly lines is suppressed, and when OBJ is not positive, listing of the generated code is suppressed. The two listing level coun- ters are modified implicitly by various statements, see Appendix D. The LISTOFF. statements without options decreases both the SRC and OBJ level counter. The LISTOFF. statements with options decreases the counters specified. \f 4_._2_4_ _ _ _ _ _ _L_I_S_T_O_N_._ _ _ _L_i_s_t_i_n_g_ _L_e_v_e_l_ _I_n_c_r_e_a_s_e_._ 4.24 S_y_n_t_a_x_:_ l' LISTON. option',option'... option'::= SRCOBJ E_x_a_m_p_l_e_s_:_ LISTON. ; INCREASE SRC AND OBJ LISTON. OBJ ; DECREASE OBJ ONLY S_e_m_a_n_t_i_c_s_:_ The assembler contains two listing level counters, SRC and OBJ. At the beginning of the assembly process, these counters are ini- tialized to 1, except when the list.all parameter is stated to the call of the program. When SRC is not positive, listing of as- sembly line is suppressed and when OBJ is not positive, listing of the generated code is suppressed. The two listing level coun- ters are modified implicitly by various statements, see Appendix D. The LISTON. statement without options increases both the SRC and OBJ level counter. The LISTON. statement with options increases the counters specified. \f 4_._2_5_ _ _ _ _ _ _L_I_S_T_R_D_X_._ _ _ _L_i_s_t_i_n_g_ _R_a_d_i_x_._ 4.25 Not Implemented. \f 4_._2_6_ _ _ _ _ _ _L_O_C_._ _ _ _S_e_t_ _L_o_c_a_t_i_o_n_ _C_o_u_n_t_e_r_._ 4.26 S_y_n_t_a_x_:_ l' LOC. expression' E_x_a_m_p_l_e_s_:_ HERE: LOC. L ; SET LOCATION COUNTER TO L . . . LOC. HERE ; BACK TO HERE S_e_m_a_n_t_i_c_s_:_ Assigns a new value to the location counter. The value must be an absolute or relocatable address, and the expression may contain no forward references. \f 4_._2_7_ _ _ _ _ _ _M_A_C_R_O_._ _ _ _M_a_c_r_o_ _D_e_f_i_n_i_t_i_o_n_ _H_e_a_d_._ 4.27 S_y_n_t_a_x_:_ MACRO. macro name',stdparam'... E_x_a_m_p_l_e_s_:_ See chapter 5. S_e_m_a_n_t_i_c_s_:_ Declares a macro and specifies standard parameters. The macro de- finition head must be followed by one or more macro definition lines, the last of which must contain an asterisk, *, in column 1. See chapter 5 for further information about macros and macro definitions. \f 4_._2_8_ _ _ _ _ _ _M_E_S_S_A_G_E_._ _ _ _M_e_s_s_a_g_e_._ 4.28 S_y_n_t_a_x_:_ l' MESSAGE. expression' E_x_a_m_p_l_e_:_ MESSAGE. . ; START OF CODE PART S_e_m_a_n_t_i_c_s_:_ Causes the line to be output on the message file with no flags appended. If the expression is present, the value is listed in the margin of the listing. The statement can be used to output important information from the assembly. \f 4_._2_9_ _ _ _ _ _ _M_L_I_B_._ _ _ _M_a_c_r_o_ _L_i_b_r_a_r_y_._ 4.29 S_y_n_t_a_x_:_ l' MLIB. string',name'... E_x_a_m_p_l_e_:_ MLIB. "FPLIB", ZONE. ; GET ZONE MACRO FROM FPLIB S_e_m_a_n_t_i_c_s_:_ Forces the assembler to include a source file in the source file stream, just after the source lines containing the MLIB. state- ment. The string contains the name of the file to be included. The assembler searches the file for the macro definitions with macro names identical to the names specified in the MLIB. state- ment. The assembler now processes these macro definitions. It continues reading from the file until macro definitions matching all names in the list has been found, or until an end medium cha- racter is read or until an EOF. statement is scanned. During the search, all statement but the MACRO. and the EOF. sta- tement is ignored. If the file is scanned to the end, the assembler generates the following line: ; MACRO LIBRARY EXHAUSTED, MACROS MISSING and flags it with an S-flag. After the search, the assembler continues reading from the source file containing the MLIB. statement. Usually, during scan of the library file, the listing is suppres- sed, i.e. the listing level counters SRC and OBJ are decreased\f before the scan is initiated and increased again when the scan is terminated. If the listing level counter SRC is ' 1 after the decrease, the library file is listed, otherwise, the library file is not listed, and it is not scanned at all in pass two of the assem- bly. \f 4_._3_0_ _ _ _ _ _ _P_A_G_E_._ _ _ _N_e_w_ _P_a_g_e_._ 4.30 S_y_n_t_a_x_:_ l' PAGE. E_x_a_m_p_l_e_:_ PAGE. ; HEAD OF PROCEDURE: PROC S_e_m_a_n_t_i_c_s_:_ Causes the assembler to eject to a new page on the listing. Espe- cially useful within macros, as a form feed character in a macro definition only causes the assembler to eject to a new page, when listing the macro definition. The PAGE. statement then works du- ring the macro expansion. \f 4_._3_1_ _ _ _ _ _ _P_F_L_A_B_E_L_._ _ _ _P_a_g_i_n_g_ _F_i_l_e_ _L_a_b_e_l_._ 4.31 S_y_n_t_a_x_:_ l' PFLABEL. string' E_x_a_m_p_l_e_:_ PFLABEL. "TESTFILE" S_e_m_a_n_t_i_c_s_:_ Indicates that this module requires the paging system. The string, if present, specifies the name of the paging file, if not present, a working file is used. If the program contains virtual sections, a PFLABEL. statement is not required. \f 4_._3_2_ _ _ _ _ _ _P_O_O_L_._ _ _ _P_o_o_l_ _G_e_n_e_r_a_t_i_o_n_._ 4.32 S_y_n_t_a_x_:_ l' POOL. E_x_a_m_p_l_e_:_ FA FO1, =2.0 ; F01:= F01*2.0 . . . POOL. ; GENERATE POOLED DATA S_e_m_a_n_t_i_c_s_:_ Generates data corresponding to the current pool of the current section. The current pool is then empty, and more pooled data should be generated by a later POOL. statement or implicitly at the end of the section. The POOL. statement is useful if you, be- cause of the limited range of the relative addressing cannot ac- cess the pooled data. Then a POOL. statement should be inserted closer to the location, where problems arise. It can also be used for documentation purposes at the end of the coding for each sec- tion. \f 4_._3_3_ _ _ _ _ _ _R_E_F_._ _ _ _D_e_c_l_a_r_a_t_i_o_n_ _o_f_ _E_x_t_e_r_n_a_l_ _R_e_f_e_r_e_n_c_e_s_._ 4.33 S_y_n_t_a_x_:_ l' REF. symbol',symbol'... E_x_a_m_p_l_e_:_ REF. SIN . . . RL W3, =P(SIN) ; CALL SIN JL W3, X3+D(SIN) ; S_e_m_a_n_t_i_c_s_:_ Declares one or more symbols as external references, i.e. the va- lue of the symbol is imported from another module during the link process. The REF. statement forces the linker to resolve the re- ferences. \f 4_._3_4_ _ _ _ _ _ _R_E_V_._ _ _ _R_e_v_i_s_i_o_n_ _N_u_m_b_e_r_ _o_f_ _P_r_o_g_r_a_m_._ 4.34 S_y_n_t_a_x_:_ l' REV. real' E_x_a_m_p_l_e_:_ REV. 03.02 S_e_m_a_n_t_i_c_s_:_ States the revision number of an assembler module. The revision number r should be in the range 0.00_r_99.99. It is output on the listing and in the generated code. The default revision number is 0.00. Only one REV. statement must be present in an assembler mo- dule. \f 4_._3_5_ _ _ _ _ _ _R_S_E_C_T_._ _ _ _R_e_s_i_d_e_n_t_ _S_e_c_t_i_o_n_._ 4.35 S_y_n_t_a_x_:_ expression' UURSECT.DD section name' E_x_a_m_p_l_e_:_ RSECT. CODEAREA ; SELECT CODE AREA . . . RSECT. DATAAREA ; SWITCH TO DATA AREA . . . RSECT. CODEAREA ; BACK TO CODE AREA S_e_m_a_n_t_i_c_s_:_ Selects a resident section. The location counter is set to the current top of the section selected. A named section can always be reselected by putting the section name as argument to the RSECT. statement. If an expression is present, it must denote an integer value; no forward references are allowed. In this case, a zero value means reselection of the current resident blank sec- tion, and a nonzero value means selection of a new blank section. If no arguments are present, the current resident blank section is selected. The sections are always created when they are selec- ted (or reselected) the first time. At the end of the assembly process, the current pool of all resi- dent sections are emptied, generating the appropriate code. Then these sections are placed consecutively after each other, forming\f one resident section. This section may be extended by pointers to resident objects, caused by the use of virtual addressing mode to resident objects. Finally one resident blank section containing all resident code is output to the object file. \f 4_._3_6_ _ _ _ _ _ _S_R_E_F_._ _ _ _D_e_c_l_a_r_a_t_i_o_n_ _o_f_ _S_e_c_o_n_d_a_r_y_ _E_x_t_e_r_n_a_l_ _R_e_f_e_r_e_n_c_e_s_._ 4.36 S_y_n_t_a_x_:_ l' SREF. symbol',symbol'... E_x_a_m_p_l_e_:_ SREF. DMULT . . . ; OPERATOR NO XX: DOUBLE PRECISION MULTIPLICATION: . . . JL W3, *=DMULT . . . S_e_m_a_n_t_i_c_s_:_ Declares one or more symbols as external secondary references, i.e. the value of the symbol is inported from another module du- ring the link process. The SREF. statement do not force the lin- ker to resolve the references, but if any reference is exported from another module, that reference is resolved, otherwise the reference has the value -1. For instance, if you positively know that double precision multiplication is not used in a specific program, you do not have to include that module during the lin- king. However, the coding in the runtime system would probably have a secondary reference to the double precision routine. \f 4_._3_7_ _ _ _ _ _ _T_E_X_T_._ _ _ _T_e_x_t_ _G_e_n_e_r_a_t_i_o_n_._ 4.37 S_y_n_t_a_x_:_ l' TEXT. string' E_x_a_m_p_l_e_s_:_ NL = 10 TEXT. "ABC10'" TEXT. "ABCDNL'" TEXT. "STRING10'" S_e_m_a_n_t_i_c_s_:_ Generates one or more data words each containing 3 characters of the string. The last word may contain one or two null characters, if the number of characters in the string modulo 3 is 2 or 1 re- spectively. The character string is left justified. \f 4_._3_8_ _ _ _ _ _ _T_I_T_L_E_._ _ _ _T_i_t_l_e_ _o_f_ _P_r_o_g_r_a_m_._ 4.38 S_y_n_t_a_x_:_ l' TITLE. name',string' E_x_a_m_p_l_e_:_ TITLE. MESSAGE,"FP UTILITY PROGRAM: MESSAGE" S_e_m_a_n_t_i_c_s_:_ States the short title and the long title of the assembler mo- dule. The short title is a name; it is output on the listing and in the generated code. The default short title is: main. The long title, if present, is a string; it is output on the listing, how- ever, at most 30 characters are output. The default long title is 30 space characters. Only one title statement must be present in an assembler module. \f 4_._3_9_ _ _ _ _ _ _V_S_E_C_T_._ _ _ _V_i_r_t_u_a_l_ _S_e_c_t_i_o_n_._ 4.39 S_y_n_t_a_x_:_ expression' UUVSECT.DD section name' UU,overlay base',rewrite'DD overlay base'::= expression' rewrite'::= expression' E_x_a_m_p_l_e_:_ VSECT. 1 ; ONE VIRTUAL SECTION DATA. 1111,2222 ; VSECT. 1 ; ANOTHER VIRTUAL SECTION DATA. 3333,3333 ; S_e_m_a_n_t_i_c_s_:_ Selects a virtual section. The location counter is set to the current top of the section selected. A named section can always be reselected by putting the section name as argument to the VSECT. statement. If an expression is present as first argument to the VSECT. statement, it must denote an integer value; no for- ward references are permitted. In this case a zero value means reselection of the current virtual blank section, and a nonzero value means selection of a new blank section. If the first argu- ment is not present, the current virtual blank section is selec- ted. The sections are always created, when they are selected (or reselected) the first time. The overlay base is always a zero or a resident relocatable add- ress (or it could be a nonzero absolute address). If it is not zero, it denotes the position in core where the virtual section should be placed, when it is brought into core from disc. Thus\f the section is always brought into core at the same position, and the loader converts all virtual addresses within the section, pointing at objects within the section, to absolute addresses, once and forever before the section is written onto disc. If a nonzero overlay base is present, the rewrite information must be zero, if present. The rewrite information is an integer value. If the last bit is set, it signals to the paging system that the section is born as a section which should be rewritten onto disc, whenever it is re- moved from core. If the last bit is zero, it signals to the pa- ging system that no rewrite is wanted. Omitted arguments are treated as if a zero was present. If a virtual section is selected several times, the first nonzero overlay base becomes the final overlay base, and the first non- zero rewrite information becomes the final rewrite information, if nonzero arguments are present at all. At the end of the assembly process, the current pool of all vir- tual sections are emptied, generating the appropriate code. The size of the section is rounded up to the first number divisible by 512 halfwords, so that any virtual section, when placed onto the disc, are placed on an integral number of backing storage segments. The sections are then placed consecutively after each other and output seperately to the object file. \f 5_._ _ _ _ _ _ _ _ _M_A_C_R_O_S_._ 5. The macro feature of the Macro Assembly Language enables you to define your own command mnemonics via macro definition state- ments. The macro definition contains a number of skeleton state- ments, and it contains a prescription for substituting formal pa- rameters with actual parameters, when the macro is called. When this command mnemonic is encountered in a macro call state- ment, the assembler takes input from the skeleton statements con- tained in the macro definition, continuously substituting formal parameters with actual parameters, supplied in the macro call. This process is called a macro expansion. During macro expansion, tha same macro or other macros may be called, new macros may be defined etc., up to an implementation defined limit. Macros are usually used to define - more powerful instructions, for instance sequences of standard RC8000 instructions, or procedure callns setups. - complicated common data structures, e.g. zones. - pseudo instructions for interpretation. 5_._1_ _ _ _ _ _ _ _M_a_c_r_o_ _C_a_l_l_ _S_t_a_t_e_m_e_n_t_._ 5.1 S_y_n_t_a_x_:_ l' macro name' param',param'... \f The macro name is a name. It must be the name of a macro already defined. The parameters, param', are special strings governed by the following rules: 1. Leading spaces are not part of the string. 2. Trailing spaces are not part of the string. 3. If the parameter conforms to the rules for forming a field', the string is identical to character sequence', see section 2.2.5. 4. When a quote during a left to right scan appears in the string, commas and semicolon are considered as a part of a normal string until the terminating quote or a new line ap- pears. E_x_a_m_p_l_e_:_ MYMAC A, ",A," , (: AL W0, 0 :),, 128-";" ; STRANGE CALL here the parameters to MYMAC are: A",A," AL W0, 0 128-";" where is used to clarify exactly how many spaces are part of the parameters. S_e_m_a_n_t_i_c_s_:_ When a macro call statement is recognized by the assembler, it isolates the parameters according to the rules 1 to 4 above. The parameters are numbered from 1 to n, where n denotes the number of parameters encountered. It then invokes the macro expansion, and continues reading from the macro definition. Any reference within macro definition lines to formal parameter j, where 1_j_n, results in a substitution of the formal parameter string with the actual parameter j. If the actual parameter is the empty string,\f or j'n, the formal parameter string is substituted with a stan- dard parameter, as defined in the macro definition. When the mac- ro is entered, two macro work names are assigned values, namely: - <ARGCNT is set to n, the number of actual parameters. - <CALLCNT is set to the number of times, the macro has been called. When the macro definition is exhausted, reading continues after the macro call statement. Entering the macro, the listing level counter SRC is decreased and it is increased again, when leaving the macro; this can be overwritten by stating the parameter melist.yes to the call of the assembler. Locally, the listing may be controlled by the LISTON./LISTOFF. statements or by placing a hyphen, -, in column 1 of the lines. By default, the listing will contain the macro call, and in the margin, the generated code for the expansion. 5_._2_ _ _ _ _ _ _ _M_a_c_r_o_ _D_e_f_i_n_i_t_i_o_n_ _S_t_a_t_e_m_e_n_t_._ 5.2 S_y_n_t_a_x_:_ MACRO. macroname',stdparam'... macro definition line' ... The macro name is a name. It must be the name of the latest de- fined macro, or it must not conflict with an already existing name. The standard parameters, stdparam' are special strings go- verned by the same rules as the rules for param' in a macro call statement, see section 5.1. \f A macro definition line is a single line' as defined in section 2.1. Basically it is just a sequence of characters. However, the following rules governs the interpretation of the macro defini- tion line: 1. An asterisk, *, in column 1 of a macro definition line signals the end of a macro definition. The remaining part of the line is not interpreted at all. 2. A hyphen, -, in column 1 of a macro definition is not inter- preted according to the specification in section 2.1.6 during the scan of the macro definition. During macro expansion, it works normally, i.e. as a listing suppress symbol. 3. A semicolon, ;, signals the end of the line, i.e. the semico- lon itself and characters to the right of the semicolon are not considered part of the macro definition line. 4. After applying rule no. 3, trailing spaces are not considered a part of the line. 5. If a substring of the macro definition line forms a field, it denotes a formal parameter. The character sequence' of the field, see section 2.2.5, must be an integer' or a macro work name'. 6. The underline, _, is in itself ignored, but it causes the in- terpretation of the following character to be suspended, i.e. rules 3 to 6 are suspended, when the character to the right of the underline is scanned. This is convenient, if you wish to include the characters *, ;, _, or the character combination ,(:, in the macro definition line. E_x_a_m_p_l_e_:_ MACRO. SHE ; MACRO: SHE W, DISP SL (:1:),(:2:) ; SKIP IF WDISP JL .+4 ; SKIP UNCONDITIONALLY * \f S_e_m_a_n_t_i_c_s_:_ If the macro name is not yet defined, a new macro is defined. The standard parameters are stored together with the macro defini- tion. If the macro name is identical to the macro name in the la- test defined macro, no standard parameters are allowed; the defi- nition is then regarded as a continuation of the latest macro de- finition. The macro definition lines are scanned according to the rules 1 to 6, and stored together with the macro definition. A formal pa- rameter (:integer':) or (:macro work name':) denotes a parame- ter number, being either the value of the integer or the current value of the macro work name at the time of the macro expansion. The listing level counters, SRC and OBJ are decreased when the macro definition lines are scanned, and increased again when lea- ving the macro definition. This can be overwritten by stating the parameter mdlist.yes to the call of the assembler. Locally, the listing may be controlled by the LISTON./LISTOFF. statements. 5_._3_ _ _ _ _ _ _ _M_a_c_r_o_ _W_o_r_k_ _N_a_m_e_s_._ 5.3 The macro work names are characterized by the first character, the dollar sign, <. They exist during an expansion of macro and disappears when the macro expansion has finished. The value of a macro work name does not survive from one pass to another, so a forward reference to a macro work name makes no sense, it will always be undefined. The macro work names never conflict with macro work names in other macros, or in other calls of the same macro, not even if the same macro is called recursively, and thus is active in several incarnations. A macro work name is undefined until it has been assigned a value, except for the two standard macro work names <ARGCNT and <CALLCNT. These are initialized\f whenever a macro is called to the number of actual parameters to the call, and to the number of times the macro has been called (in this pass). <ARGCNT is useful if you want to scan the actual parameter list by a DO. statement, and <CALLCNT is useful if you want to generate special code the first time a macro is called, or if you want to produce unique names within a macro. In the latter case, use <CALLCNT as indexpart in a name. It always requires some discipline, using non macro work names within macros, if conflicts should be avoided. As a generale rule use a dot, ., somewhere within symbols generated by macros com- bined with some letters from the macro name. Warning: Never use macro work names as parameters to macro calls, unless you understand this warning. 5_._4_ _ _ _ _ _ _ _M_a_c_r_o_ _P_r_o_g_r_a_m_m_i_n_g_ _H_i_n_t_s_._ 5.4 Whenever a formal parameter is part of an expression, enclose the formal parameter in parenthesis. For instance, if a macro defini- tion line contains: DATA. (:1:)*2, ((:1:))*2 and the actual parameter string is: ELEMENTS+1 the expansion will be DATA. ELEMENT+1*2, (ELEMENTS+1)*2 It is obvious that the second argument to the DATA. statement is the correct one. Note that, within expression, () is treated as a zero, so that an empty actual parameter is treated as a zero, if parentheses surrounds a formal parameter, (if no standard value is present in the macro definition). If you want to eject to the top of the listing during a macro ex- pansion, use the PAGE. statement. A form feed preceeding a macro\f definition line, only causes eject to the top of the line during listing of the macro definition, and not during listing of the expansion. Within macros, the actual parameter string can be compared to any string for equality, using the field comparison, see section 2.2.5. If you want to test if parameter string no. 1 is YES, use the following statement: IF. _(:YES::(:1:):) If the macro is called with the actual parameter NO, and the ex- pansion is listed, it will appear as: IF. (:YES::NO:) Notice the use of _ in order to suspend interpretation of (: as start of formal parameter. 5_._5_ _ _ _ _ _ _ _M_a_c_r_o_ _E_x_a_m_p_l_e_s_._ 5.5 5_._5_._1_ _ _ _ _ _T_h_e_ _Z_O_N_E_._ _M_a_c_r_o_._ 5.5.1 A zone is a collection of information, zone descriptor, share de- scriptors and storage areas, used when communicating with files. The different fields of the descriptors are shown in the macro ZNAMES. of the file sysmaclib, see appendix K. The ZONE. macro is used to declare a zone, i.e. to allocate memory for the descrip- tors and the storage areas, and to initialize certain fields of the descriptor. The ZONE. macro is called with 5 parameters: - the name of the zone, which is assigned the value of the zone descriptor address. \f - the total size of the storage area to be used for buffers. - the number of buffers. - a giveup procedure, see ref. 4. - a giveup mask, see ref. 4. Standard values for the second and the third parameter are 512 and 1 respectively. Example 5 shows the definition of the macro ZONE.. The macro begins with a computation of the address of the first share descriptor, the first buffer, and the size of each buffer. The zone descriptor parts are build and various fields are initi- alized. When the zone descriptor address is defined, listing of the text of the line is turned on and afterwards it is turned off again. Later on in the macro definition, share descriptors are built and finally, the storage area is reserved. Throughout the macro, the generated code for the initialized fields are listed, while the less important resultss of the macro is suppressed, using a - in column 1. The result of calling a ZONE. macro is shown on page 2 of example 1. \f Example 5. \f 5_._5_._2_ _ _ _ _ _T_h_e_ _N_F_A_K_._ _M_a_c_r_o_._ 5.5.2 Example 6 shows the assembly of a program containing a macro de- finition NFAK. with two parameters, the first being an argument and the second being the result of the macro call, arg2=1*2*3*...*arg1. The program also contains the macro call: NFAK. 10,X and a complete listing of the macro expansion, including the code not processed due to conditional statements. The macro is recursive. If the argument = 1, the result is set to 1, else the call: NFAK. (:1:)-1,(:2:) is performed, followed by the multiplication: (:2:):=(:2:)*((:1:)). The listing shows how macro calls are built until arg1=1, and how they are left, successively forming the correct result. \f Example 6. \f Example 6. (cont.) \f 5_._5_._3_ _ _ _ _ _T_h_e_ _N_D_E_F_._ _M_a_c_r_o_._ 5.5.3 Example 7 shows the assembly of a program containing the macro NDEF., which is called with a list of names. The macro collects these names by generating a macro, NAMES., which later on may be called with an argument, being an index into the list of names. The NDEF. macro illustrates how a macro may collect some options, which can be retrieved later on in the assembly program, in this case by the macro NAMES. which generates a text statement contai- ning the name. The NDEF. macro builds the first part of the NAMES. macro: - <NAMENO:=1 when entered. The NAMES. definition is temporarily suspended, but resumed within the DO. statement. Thus, depending on the number of parameters to NDEF. the following lines are added to the NAMES. macro: - IF. <NAMENO .EQ. ((:1:)) - LISTON. SRC TEXT. "next name in the NDEF. list'" - LISTOFF. SRC ENDC. Example 7 also shows calls of the macro NAMES.. \f Example 7. \f 6_._ _ _ _ _ _ _ _ _A_S_S_E_M_B_L_E_R_ _P_R_O_C_E_S_S_I_N_G_._ 6. The assembler reads the source program twice and produces - object code - listing - assembly messages - cross reference listing Capability and assembly time depends on the resources available. 6_._1_ _ _ _ _ _ _ _O_b_j_e_c_t_ _C_o_d_e_._ 6.1 The assembler generates variable length records primarily contai- ning binary words with relocation information. But also records describing externals, sections, etc. are generated. If no exter- nal references or external definitions are present in the source program, the object program can be loaded, but usually it is read by the linker, which resolves external references, producing a module which can be loaded. The output from the assembler is called a link module. The load module contains a subset of the record types of a link module. 6_._2_ _ _ _ _ _ _ _L_i_s_t_i_n_g_._ 6.2 The listing of the program is output on the current output file during pass 2 of the assembly. It consists of a number of pages numbered consecutively from 1. Each page is identified by: - macro revision number - short title of the module - long title of the module - revision number of the module - assembly date - assembly time \f Within each page the assembly lines are numbered consecutively from 1. The assembly lines are listed together with information about the generated code and up to 40 lines of generated code may be listed per assembly line. Each line of the listing contains the following fields: - assembly line number - error flags (c.f. appendix E) - value of location counter - relocation of location counter (c.f. appendix F). - value of evaluated expression/generated code - relocation of evaluated expression/generated code - characters of assembly line The two location counter fields are present, only when the assem- bly line causes generation of some code. The value of evaluated expression/generated code is normally printed as an integer. However, when assembling instructions and the DATAH. statement, it is printed as two halfwords, the first in the range 0,4095, the second in the range -2048,2047, and when assembling the TEXT. statement, it is printed as three 8-bit character values. 6_._3_ _ _ _ _ _ _ _A_s_s_e_m_b_l_y_ _M_e_s_s_a_g_e_s_._ 6.3 The listing of assembly messages is output on the current output file. It contains all invalid assembly lines, and all lines con- taining an ERROR. or a MESSAGE. statement. Errors encountered during pass 1 of the assembler are output pri- or to the listing of the program. Some pass 1 errors may cause the assembler to abort further processing. \f Errors encountered during pass 2 of the assembler and lines con- taining ERROR. and MESSAGE. statements are output after the lis- ting of the program. The assembly messages contains the same fields as the program listing, however the assembly line number field is prefixed by the page number. The line number is controlled by the listing level counters SRC and OBJ. If a line contains an error, the current line number on the listing (as if list.yes was stated as parameter to the call of the assembler) is delivered in the assembler message. Note that the actual line need not be listed on the listing, due to listing suppress facilitites in the assembler. For instance, nor- mally, if an error occurs during a macro expansion, the line on the listing contains the macro call statement, but the line in the assembly message contains the invalid expansion of the macro call. Both the line on the listing and the line in the message contain the error flags, as all flags are accumulated on the current line on the listing. 6_._4_ _ _ _ _ _ _ _C_r_o_s_s_ _R_e_f_e_r_e_n_c_e_ _L_i_s_t_i_n_g_._ 6.4 Not implemented. \f 6_._5_ _ _ _ _ _ _ _R_e_q_u_i_r_e_m_e_n_t_s_ _a_n_d_ _C_a_p_a_c_i_t_i_e_s_._ 6.5 The assembler requires as a minimum the following ressources: PROCESS SIZE 40 Khw MESSAGE BUFFERS 3 AREA PROCESSES 6 CATALOG ENTRIES 7 The capacities depend on the available process size. Below, approximate values of the more important capacities are given. PROCESS SIZE MAX CAPACITY (approx) 50 Khw 100 Khw 150 Khw BLOCK LEVELS 10 10 10 NAMES 700 2200 3700 BLOCKS 300 1300 2300 SECTIONS 300 1300 2300 MACRO DEF. LINES 1600 4100 6600 ACTIVE MAC. WORK NAMES 50 60 70 The maximum recursion level, conditional assembly level etc. depends on the process size too, but the actual values depends on the macro parameter structure, etc. and no guideline can be given. The assembly speed is 2000 source lines per minute or less, depending on the complexity of the statements, and the process size. \f A_._ _ _ _ _ _ _ _ _R_E_F_E_R_E_N_C_E_S_._ A. 1. RCSL No. 31-I1235, April 1979, Einar Mossin R_C_8_0_0_0_ _R_e_f_e_r_e_n_c_e_ _M_a_n_u_a_l_._ 2. RCSL No. 31-D364, April 1975, Hans Rischel S_Y_S_T_E_M_ _3_ _U_T_I_L_I_T_Y_ _P_R_O_G_R_A_M_S_,_ _P_a_r_t_ _O_n_e_._ 3. RCSL No. 31-D345, September 1974, T.A. Aris, Hans Rischel S_Y_S_T_E_M_ _3_ _U_T_I_L_I_T_Y_ _P_R_O_G_R_A_M_S_,_ _P_a_r_t_ _T_w_o_._ 4. RCSL No. 31-D379, November 1975, T.A. Aris (ed.) S_Y_S_T_E_M_ _3_ _U_T_I_L_I_T_Y_ _P_R_O_G_R_A_M_S_,_ _P_a_r_t_ _T_h_r_e_e_._ 5. RCSL No. 31-D567 R_C_8_0_0_0_ _L_i_n_k_e_r_,_ _R_e_f_e_r_e_n_c_e_ _M_a_n_u_a_l_ 6. RCSL No. 31-D568 R_C_8_0_0_0_ _L_o_a_d_e_r_/_P_a_g_i_n_g_ _S_y_s_t_e_m_ _(_S_Y_S_L_D_R_0_0_1_)_,_ _R_e_f_e_r_e_n_c_e_ _M_a_n_u_a_l_ \f B_._ _ _ _ _ _ _ _ _A_S_S_E_M_B_L_Y_ _A_L_P_H_A_B_E_T_._ B. M_ V N C V N C V N C V N C 0 NUL blind 32 SP blank 64 @ ill. 96 / ill. 1 SOH ill. 33 ! 65 A 97 a 2 STX ill. 34 " 66 B 98 b 3 EXT ill. 35 # 67 C 99 c 4 EOT ill. 36 < 68 D 100 d 5 ENQ ill. 37 % ill. 69 E 101 e 6 ACK ill. 38 & ill. 70 F 102 f 7 BEL ill. 39 > 71 G 103 g 8 BS ill. 40 ( 72 H 104 h 9 HT ill. 41 ) 73 I 105 i 10 NL 42 * 74 J 106 j 11 VT ill. 43 + 75 K 107 k 12 FF 44 , 76 L 108 l 13 CR ill. 45 - 77 M 109 m 14 SO ill. 46 . 78 N 110 n 15 SI ill. 47 / 79 O 111 o 16 DLE ill. 48 0 80 P 112 p 17 DC1 ill. 49 1 81 Q 113 q 18 DC2 ill. 50 2 82 R 114 r 19 DC3 ill. 51 3 83 S 115 s 20 DC4 ill. 52 4 84 T 116 t 21 NAK ill. 53 5 85 U 117 u 22 SYN ill. 54 6 86 V 118 v 23 ETB ill. 55 7 87 W 119 w 24 CAN ill. 56 8 88 X 120 x 25 EM 57 9 89 Y 121 y 26 SUB ill. 58 : 90 Z 122 z 27 ESC ill. 59 ; 91 Æ 123 æ 28 FS ill. 60 92 Ø 124 ø 29 GS ill. 61 = 93 Å 125 å 30 RS ill. 62 ' 94 ill. 126 ill. P_ 31 US ill. 63 ? ill. 95 _ or - 127 DEL ill. V = 7 bit value of character N = name of character C = comments ill. means that the character is illegal outside texts and comments. \f C_._ _ _ _ _ _ _ _ _L_I_S_T_ _O_F_ _R_E_S_E_R_V_E_D_ _N_A_M_E_S_._ C. <ARGCNT DATAH. ISECT. SH <CALLCNT DECLARE. JD SL . DEF. JE SN .AND. DI JL SO .EQ. DL KS SP .GE. DO LA SREF. .GT. DO. LD SS .LE. DS LISTOFF. SX .LT. EA LISTON. SZ .MOD. EL LISTRDX. TEXT. .NE. END. LO TITLE. .OR. ENDC. LOC. VSECT. .RANGE. ES LS W0 .REL. EOF. LX W01 .SSECT. ERROR. MACRO. W1 .XOR. FO1 MESSAGE. W12 AA F12 MLIB. W2 ABS. F23 ND W23 AC F30 NOT. W3 AD FA NS W30 AL FD P AM FM PAGE. WA AS FPLABEL. PFLABEL. WD ASECT. FS POOL. WM BEGIN. GG RE WS BLK. GP REF. X1 BLKH. HL REV. X2 CF HS RI X3 CI IF. RL XL COPY. IFF. RS XS CSECT. IFN. RSECT. ZL D IFT. RX DATA. IFTF. SE \f D_._ _ _ _ _ _ _ _ _S_U_R_V_E_Y_ _O_F_ _L_I_S_T_I_N_G_ _L_E_V_E_L_ _C_O_U_N_T_E_R_ _M_O_D_I_F_I_C_A_T_I_O_N_S_._ D. + means listing level increase - means listing level decrease STATEMENT SRC OBJ FP PARAMETER REMARKS DO. - - cdlist.no only when expression 1 DO. - - dolist.no only when expression ' 1 and not first repetition. ENDC. + + cdlist.no after skipping lines ENDC. + + dolist.no after last repetition IF. - - cdlist.no only when skipping lines IFN. - - cdlist.no only when skipping lines IFF. + when going from skipping IFT. UU+ +DD cdlist.no to normal processing, - when IFTF. UU- -DD going the opposite way LISTOFF. - - depending on option LISTON. + + depending on option MACRO. - - mdlist.no * (column 1) + + mdlist.no when terminating a macro definition D_MLIB.U_ U+ + + when library search beingD U- - - when search terminatesD macro call - melist.no * (column 1) + melist.no when terminating a macro call - (column 1) listing when counters ' 1 else listing when counters ' 0 \f E_._ _ _ _ _ _ _ _ _E_R_R_O_R_ _F_L_A_G_S_._ E. A: LABEL ASSIGNMENT ERROR A label assignment conflicts with an assembly direc- tive. C: CONDITIONAL ASSEMBLY ERROR The structure of IF.-type, DO. or ENDC. statements is illegal. E: EXPRESSION ERROR Syntax error in an expression, or the expression is im- possible to evaluate, or the resultant value not allo- wed in the context. F: FORMAL PARAMETER ERROR Error in formal parameter in a macro definition. H: HALFWORD ERROR A value cannot be held in a halfword, i.e. the range is outside -2048, 2047 or -2048, 4095 depending on the context. I: INDEX ERROR The index part of a name evaluates to an illegal va- lue. L: LINE TOO LONG A source line or an expanded macro line is too long. M: MULTIPLE DEFINED A symbol is defined twice or more, or it is assigned different values in different passes, in conflict with its use. Also used when title, version, or the like are multiple defined. \f N: NUMBER ERROR Error in character string forming a number. P: POOL ERROR Pool capacity exceeded. At most 125 words can be held in one literal pool. Q: QUESTIONABLE CHARACTER Illegal character in input; on the listing the charac- ter is replaced by a ?. R: RELOCATION ERROR Relocation properties of operand or expression ille- gal. S: STATEMENT ERROR Syntactical or semantical error in a statement, or sta- tement generated by the assembler recovering a previous error. T: TABLE ERROR Table capacity exceeded, the assembly continues. U: UNDEFINED A symbol is not properly defined. W: REWRITE ILLEGAL Rewrite information in section statement illegal. X: EXTERNAL ERROR External properties of operand or expression illegal. *: USER DEFINED ERROR Generated by the ERROR. statement. \f F_._ _ _ _ _ _ _ _ _R_E_L_O_C_A_T_I_O_N_ _M_O_D_I_F_I_E_R_S_ _O_N_ _L_I_S_T_I_N_G_._ F. sp': Absolute value. R: Resident relocatable value. V: Virtual relocatable value. I: Init relocatable value. C: Common relocatable value. P: Page table address. D: Page displacement. X: Absolute value with external modification. XR: Resident relocatable value with external modification. XV: Virtual relocatable value with external modification. XD: Page displacement with external modification. XI: External indirect value. XH: Absolute value with external halfword modification. \f G_._ _ _ _ _ _ _ _ _C_A_L_L_ _O_F_ _A_S_S_E_M_B_L_E_R_._ G. S_y_n_t_a_x_:_ object'= macro UUs' source' DDD... UUs' modifier' DD source'::= input bsfile' object'::= bsfile' yes no all UUlist.DD on off intervals' page.linesperpage' modifier'::= yes UUxref.DD no mdlist. melist. yes dolist. no cdlist. yes UUcompressed.DD no test. testmask' \f intervals'::= interval'.interval'... interval'::= firstpage'.firstline'.lastpage'.lastline' linesperpage' testmask' firstpage' firstline' UU::= integer'DD lastpage' lastline' \f G_._ _ _ _ _ _ _ _ _C_A_L_L_ _O_F_ _A_S_S_E_M_B_L_E_R_ _(_c_o_n_t_>_d_)_._ G. S_e_m_a_n_t_i_c_s_:_ source' Source may be any RC8000 backing storage file. If the word "input" is specified, the assembler reads from current input, up to (and including) the first EOF. statement or end of medium. The word "input" may be used once or more anywhere in the list of source files. At most 10 source files may be specified. object' Object may be any RC8000 backing storage file. If the file does not exist or cannot be used, a tem- porary file is created. If no left side is present in the call, the object program is lost. list.yes List the source program. list.no Do not list the source program, unless a list.on parameter is active. list.on Turn listing on for succeeding source files. list.off Turn listing off unless list.yes, list.all or list.intervals' are active. list.all List all source program regardless of listing sup- press options and LISTON/LISTOFF. directives. list.intervals' List the page/line interval specified. At most 10 intervals may be specified. \f page.linesperpage' List the specified lines per page. At least 10 lines, at most 99 lines may be specified. xref.yes Not implemented. xref.no Not implemented. mdlist.yes List macro definition lines. mdlist.no Do not list macro definition lines. melist.yes List macro expansions. melist.no Do not list macro expansions. dolist.yes List all do repetitions. dolist.no Do not list do repetitions, but the first. cdlist.yes List assembly lines not processed. cdlist.no Do not list assembly lines not processed. compressed.yes Do not list more than one line for any assembly source line. compressed.no List all words generated for any assembly source line. test.testmask' Forces the assembler to produce test output. In general, do not use this feature. However, test.4 forces the assembler to produce a listing in pass 1. \f D_e_f_a_u_l_t_s_:_ macro list.listing' page.40 xref.no mdlist.no melist.no, dolist.no cdlist.no compressed.no test.0 where listing'::= yesno depending on whether the listing mode bit is on or off. The lis- ting mode bit may be set by the fp command mode listing.yes and reset by the command mode listing.no. \f «eof»