PSEUDO INSTRUCTIONS The pseudo instructions control the Assembler, establish pro- gram relocatability, and define program linkage as well as specify various types of constants, blocks of memory, and labels used in the program. With the Extended Assembler, pseudo instructions also control listing output. 4.1 ASSEMBLER CONTROL The Assembler control pseudo instructions establish and alter the contents of the base page and program location counters, and terminate assembly processing. Labels may be used but they are ignored by the assembler. NAM records produced by the Assemblers are accepted by the DOS, DOS-M, and BCS Loaders. ------+-----+---------+-------- NAM [name] comments NAM defines the name of a relocatable program. A relocatable program mst begin with a NAM statement.[1] A relocat- able program is assembled assuming a starting location of zero (i.e., zero relative). The name may be a symbol of one to five alphanumeric characters the first of which must be alphabetic or a period. The program name is printed on the list output. The name is optional and if omitted, the comments must be omitted also. ------+-----+---------+-------- ORG m comments The ORG statement defines the origin of an absolute program, or the origin os subsequent sections of absolute or relocatable programs. An absolute program must begin with an ORG statement. [1] The operand m, must be a decimal or octal integer specifying the initial setting of the program location counter. -------------------- [1] The Control Statement, the HED instruction, and comments may appear prior to the NAM or ORG statements. If the Control Statement (ASMB,...) does not appear on tape pre- ceding the program it must be entered from the Teleprinter. 4-1 ORG statements may be used wlsewhere in the program to define starting addresses for portions of the object code. For absolute programs the Operand field, m, may be any expres- sion. For relocatable programs, m, must be a program relocatable expression; it may not be base page or common relocatable or absolute. An expression is evaluated modulo 2**15. Symbols must be previously defined. All instructions following an ORG are assembled at consecutive addresses starting with the value of the operand. ------+-----+---------+-------- ORR comments ORR resets the program location counter to the value existing when an ORG or ORB instruction was encountered. Example: 1 5 10 15 20 25 30 35 40 ---------------------------------------- NAM RSET SET PLC TO VALUE OF ZERO, ASSIGN FIRST ADA RSET AS NAME OF PROGRAM. . . . ADA CTRL ASSUME PLC AT FIRST+2280 ORG FIRST+2926 SAVE PLC VALUE OF FIRST+2280 . AND SET PLC TO FIRST+2926 JMP EVEN+1 ASSUME PLC AT FIRST+3004 ORR RESET PLC TO FIRST+2280 More than one ORG or ORB statement may occur before an ORR is used. If so, when the ORR is encountered, the pro- gram location counter is reset to the value it contained when the first ORG or ORB of the string occurred. 4-2 Example: 1 5 10 15 20 25 30 35 40 ---------------------------------------- NAM RSET SET PLC TO ZERO FIRST ADA . . . LDA WYZ ASSUME PLC AT FIRST+2250 ORG FIRST+2500 SET PLC TO FIRST+2500 . . . LDB ERA ASSUME PLC AT FIRST+2750 ORG FIRST+2900 SET PLC TO FIRST+2900 . . . CLE ASSUME PLC AT FIRST+2920 ORR RESET PLC TO FIRST+2250 If a second ORR appears before an intervening ORG or ORB, the second ORR is ignored. ORR cannot be used to reset the location counter for locations in base page that are governed by the ORB statement. ------+-----+---------+-------- ORB comments ORB defines the portion of a relocatable program that must be assigned to the base page by the Assembler. The Label field (if given) is ignored, and the statement requires no operand. All statements that follow the ORB statement are assigned con- tiguous locations in the base page. Assignment to the base page terminates when the Assembler detects an ORG, ORR, or END statement. When more than one ORB is used in a program, each ORB causes the Assembler to resume assigning base page locations at the address following the last assigned base page location. An ORB statement in an absolute program has no significance and is flagged as an error. 4-3 Example: 1 5 10 15 20 25 30 35 40 ---------------------------------------- NAM PROG ASSIGN ZERO AS RELATIVE STARTING . LOCATION FOR PROGRAM PROG . . ORB ASSIGN ALL FOLLOWING STATEMENTS TO BASE PAGE IAREA BSS 100 . . . ORR CONTINUE MAIN PROGRAM . . ORB RESUME ASSIGNMENT AT NEXT . AVAILABLE LOCATION IS BASE PAGE . . ORR CONTINUE MAIN PROGRAM The IFN and IFZ pseudo instructions cuase the inclusion of instructions in a program provided that either an "N" or "Z", respectively, is specified as a parameter for the ASMB control statement.[1] The IFN or IFZ instructions precedes the set of statements that are to be included. The pseudo instruction XIF serves as a terminator. If XIF is omitted, END act as a terminator to both the set of statements and the assembly. IFN and IFZ may be used only when the source program is trans- lated by the Extended Assembler which is provided for 8K or larger machines. 1 5 10 15 20 25 30 35 40 ---------------------------------------- IFN comments . . . XIF All source language statements appearing between the IFN and the XIF pseudo instructions are included in the program if the character "N" is specified on the ASMB control statement. All source language statements appearing between the IFZ and the XIF pseudo instruction are included in the program if the character "Z" is specified on the ASMB control statement. 1 5 10 15 20 25 30 35 40 ---------------------------------------- IFZ comments . . . XIF ---------------------- [1] See CONTROL STATEMENT, Section 5.1 4-4 When the particular letter is not included on the control state- ment, the related set of statements appears on the Assembler output listing but is not assembled. Any number of IFN-XIF and IFZ-XIF sets may appear in a program, however, they may not overlap. An IFZ or IFN intervening between and IFZ or IFN and the XIF terminator results in a diagnostic being issued during compilation; the second pseudo instruction is ignored. Both IFN-XIF and IFZ-XIF pseudo instructions may be used in the program; hoever, only one type will be selected in a single assembly. Therefore, if both characters "N" and "Z" appear in the control statement, the character which is listed last will determine the set of coding that is to be included in the program. Example: 1 5 10 15 20 25 30 35 40 ---------------------------------------- NAM TRAVL . . . IFZ LDA CAR CMA,SZA JMP NO.GO LDA MILES DIV SPEED STA GAS XIF . . . IFN LDA PLANE CMA,SZA JMP NO.GO LDA TIME CPA COST XIF NO.GO HLT 77 . . . END Program TRAVL will perform computations involving either or neither CAR or PLANE considerations depending on the pres- ence or absence of Z or N parameters in the Control Statement. 4-5 Example: 1 5 10 15 20 25 30 35 40 ---------------------------------------- NAM WAGE . . . JSB HOUR MPY TIME1 IFZ JMP OVTIM MPY TIME2 . . . TIME1 DEC 40 TIME2 BSS 1 END Program WAGES computes a weekly wage value. Overtime consideration will be included in the program if "Z" is included in the parameters of the Control Statement. The REP pseudo instruction, available in the Extended Assem bler only, causes the repetition of the statement immediately following it a specified number of times. ------+-----+---------+-------- label REP n comments The stament following the REP in the source program is repeated n times. The n may be any absolute expression. Comment lines (indicated by an asterisk in character position 1) are not repeated by REP. If a comment follows a REP instruc- tion, the comment is ignored and the instruction following the comment is repeated. A label specified in the REP pseudo instruciton is assigned to the first repetition of the statement. A label cannot be part of the instruction to be repeated; it would result in a doubly defined symbol error. 4-6 Example: CLA TRIPL REP 3 ADA DATA The above source code would generate the following: CLA TRIPL ADA DATA ADA DATA ADA DATA Example: FILL REP 100B NOP The example above loads 100(8) memory locations with the NOP instruction. The first location is labeled FILL. Example: REP 2 MPY DATA The above source code would generate the following: MPY DATA MPY DATA ------+-----+---------+-------- END [m] comments This statement terminates the program; it marks the physical end of the source language statements. The Operand field, m, may contain a name appearing as a statement label in the cur- rent program or it may be blank. If a name is entered, it identifies the location to which the loader transfers control after a relocatable program is loaded. A NOP should be stored at that location; the loader transfers control via a JSB. 4-7 If the Operand field is blank, the Comments field must be blank also, otherwise, the Assembler attempts to interpret the first five characters of the comments as the transfer address symbol. The label field of the END statement is ignored. 4.2 OBJECT PROGRAM LINKAGE Linking pseudo intsructions provide a means for communica- tion between a main program and its subroutiens or amoung several subprograms that are to be run as a single program. These instructions may be used only in a relocatable program. The Label field of this class is igbored in all cases. The Operand field is usually divided into many subfields, separated by commas. The first space not preceded by a comma or a left parenthesis terminates the entire field. ------+-----+------------------------------------+-------- COM name[(size1)][,name2[(size2)],...] comments COM reserves a block of storage locations that may be used in common by several subprograms. Each name identifies a segment of the block for the subprogram in which the COM statement appears. The sizes are the number of words allotted to the related segments. The size is specified as an octal or decimal integer. If the size is omitted, it is assumed to be one. Any number of COM statements mayh appear in a subprogram. Storage locations are assigned contiguously; the length of the block is equal to the sum of the lengths of all segments named in all COM statements in the subprogram. To refer to the common block, other subprograms must also include a COM statement. The segment names and sizes may be the same or they may differ. Regardless of the names and sizes specified in tehe separate subprograms, these is only one common block for the combined set. It has the same relative origin; the content of the nth word of common storage is the same for all subprograms. 4-8 Example: 1 5 10 15 20 25 30 35 40 ---------------------------------------- PROG1 COM ADDR1(5),ADDR2(10),ADDR3(10) . . LDA ADDR2+1 PICK UP SECOND WORD OF SEGMENT . ADDR2+1 . END . . PROG2 COM AAA(2),AAB(2),AAC,AAD(20) . . LDA AAD+1 PICK UP SECOND WORD OF SEGMENT AAD+1 Organization of common block: PROG1 PROG2 Common name name Block ----- ----- ------ ADDR1 AAA (location 1) (location 2) AAB (location 3) (location 4) AAC (location 5) ADDR2 AAD (location 6) (location 7) (location 8) (location 9) (location 10) (location 11) (location 12) (location 13) (location 14) (location 15) ADDR3 (location 16) (location 17) (location 18) (location 19) (location 20) (location 21) (location 22) (location 23) (location 24) (location 25) 4-9 The LDA instructions in the two subprograms each refer to the same location in common storage, location 7. The segment names that appear in the COM statements can be used in the Operand fields of DEF, ABS, EQU, or any Memory Reference statement; they may not be used as labels elsewhere in the program. The loader establishes the origin of the common block; the origin cannot be set by the ORG or ORB pseudo instruction. All references to the common area are relocatable. Two or more subprograms may declare common blocks which differ is size. The subprogram that defines the largest block must be the first submitted for loading. ------+-----+------------------------+-------- ENT name1 [, name2 , ... ] comments ENT defines entry points to the program or subprogram. Each name is a symbol that is assigned as a label for some machine operation in the program. Entry points allow another sub- program to refer to this subprogram. All entry points must be defined in the program. Symbols appearing in an ENT statement may not also appear in EXT or COM statements in the same subprogram. ------+-----+-----------------------+-------- EXT name1 [, name2 , ...] comments This instructions designates labels from other subprograms which are referenced in this subprogram. The symbols must be defined as entry points by the other subprograms. The symbols defined in the EXT statement may appear in Mem- ory Reference statements, the EQU or DEF pseudo instructions. An external symbol must appear alone; it may not be in a mul- tiple term expression or be specified as indirect. References to external locations are processed by the BCS loader as indirect addresses linked through the base page. 4-10 Symbols appearing in EXT statements may not also appear in ENT or COM statements in the same subprogram. The label field is ignored. Example: 1 5 10 15 20 25 30 35 40 ---------------------------------------- PROGA NOP LDA SAMD SAMD AND SAND ARE REFERENCED IN . PROGA, BUT ARE ACTUALLY . LOCATIONS IN PROGB . JMP SAND EXT SAMD,SAND ENT PROGA END PROGB NOP . . SAMD OCT 767 SAND STA SAMD . . ENT SAMD,SAND . . JSB PROGA . . EXT PROGA . . END 4.3 ADDRESS AND SYMBOL DEFINITION The pseudo operations in this group assign a value or a word location to a symbol which is used as an operand elsewhere in the program. 4-11 ------+-----+---------+-------- label DEF m,[I] comments THe address definition statement generates one word of mom- ory as a 15-bit address which may be used as the object of an indirect address found elsewhere in the source program. The symbol appearing in the label is that which is referenced; it appears in the Operand field of a Memory Reference instruc- tion. THe operand field of the DEF statement may be any positive ex- pression in an absolute program; in a relocatable program it may be a relocatable expression or an absolute expression with a value of less than 100(8). Symbols that do appear in the Oper- and field, may appear as operands of EXT or COM statements, in the same subprogram and as entry points in other sub- programs. THe expression in the Operand field may itself be indirect and make reference to another DEF statement elsewhere in the source program. Example: 1 5 10 15 20 25 30 35 40 ---------------------------------------- NAM PROGN ZERO-RELATIVE START OF PROGRAM EXT SINE,SQRT COM SCMA(20),SCMB(50) . . JSB SINE EXECUTE SINE ROUTINE . . LDA XCMA,I PICK UP COMMON WORD INDIRECTLY . . XCMA DEF SCMA SCMA IS A 15-BIT ADDRESS . . JSB XSQ,I GET SQUARE ROOT USING TWO-LEVEL XSQ DEF XSQR,I INDIRECT ADDRESSING . . XSQR DEF SQRT SQRT IS A 15-BIT ADDRESS END PROGN 4-12 The DEF statement provides the necessary flexibility to perform address arithmetic in programs which are to be assembled in relocatable form. Relocatable programs should not modify the operand of a memory reference instruction. In the example below, if TBL and LDTBL are in different pages, the BCS Loader processes TBL as an indirect address linked through the base page. The ISZ erroneously increments the loader provided reference to the base page rather than the value of TBL. Example: 1 5 10 15 20 25 30 35 40 ---------------------------------------- LDTBL LDA TBL . . . ISZ LDTBL . . . . TBL BSS 100 Assuming the loader might assign absolute locations compara- ble to the following octal values: Page Loc Opcode Reference ---- --- ------ --------- (0) (700) DEF 4000 (1) (200) LDA (0) 700(I) (1) (300) ISZ (1) 200 (2) (0) (TBL) 4-13 It can be seen that the ISZ instruction would increment the quantity 700 rather than the address of the table (4000). The following assures correct address modification during program execution. Example: 1 5 10 15 20 25 30 35 40 ---------------------------------------- ITBL DEF TBL LDTBL LDA ITBL,I . . . ISZ ITBL . . . TBL BSS 100 This sequence might be stored by the loader as: Page Loc Opcode Reference ---- --- ------ --------- (1) (200) DEF 4000 (1) (201) LDA 200(I) (2) (300) ISZ (1) 200 (2) (0) (TBL) 4-14 The value of 4000 is incremented; each execution of LDA will access successive locations in the table. ------+-----+---------+-------- label ABS m comments ABS defines a 16-bit absolute value to be stored at the location represented by the label. The Operand field, m, may be any absolute expression; a single symbol must be defined as abso- lute elsewhere in the program. Example: 1 5 10 15 20 25 30 35 40 ---------------------------------------- AB EQU 35 ASSIGNS THE VALUE OF 35 TO THE SYMBOL AB M35 ABS -AB M35 CONTAINS -35 P35 ABS AB P35 CONTAINS 35 P70 ABS AB+AB P70 CONTAINS 70 P30 ABS AB-5 P30 CONTAINS 30 ------+-----+---------+-------- label EQU m comments The EQU pseudo operation assigns to a symbol a value other than the one normally assigned by the program location coun- ter. The symbol in the Label field is assigned the value represented by the Operand field. The Operand field may contain any expression. The value of the operand may be common, base page or program relocatable as well as abso- lute, but it may not be negative. Symbols appearing in the operand must be previously defined in the source program. The EQU instruciton may be used to symbolically equate two locations in memory; or it may be used to give a value to a symbol. The EQU statement does not result in a machine instruction. 4-15 Examples: 1 5 10 15 20 25 30 35 40 ---------------------------------------- NAM FAM . . . J3 DEF . . . LDA J3 THE SYMBOLS JFOUR AND J3+1 BOTH ADA ONE IDENTIFY THE SAME LOCATION. THE STA J3+1 AND OPERATION IS PERFORMED ON JFOUR EQU J3+1 THIS LOCATION . . . MWH AND JFOUR . . . Examples: 1 5 10 15 20 25 30 35 40 ---------------------------------------- NAM STQTB . . . COM TABLA(10) DEFINES A 10 WORD TABLE, TABLA . . . TABLB EQU TABLA+5 NAMES WORDS 6 THROUGH 10 OF . TABLA AS TABLB . . LDA TABLB+1 LOADS CONTENTS OF 7TH WORD . COMMON INTO A. THE STATEMENT LDA . TABLA+6 WOULD PERFORM THE SAME . OPERATION . NAM REG . . . A EQU 0 DEFINES SYMBOL A AS 0 (LOCATION B EQU 1 OF A-REGISTER), AND SYMBOL B AS . 1 (LOCATION OF B-REGISTER). . LDA B LOADS THE CONTENTS OF B-REGISTER INTO A-REGISTER. 4-16 4.4 CONSTANT DEFINITION The pseudo instructions in this class enter a string of one or more constant values into consecutive words of the object pro- tram. The statements may be named by labels so that other program statements can refer to the fields generated by them. ------+-----+-------------------+-------- label ASC n,<2n characters> comments ASC generates a string of 2n alphanumeric characters in ASCII code into n consecutive words.[1] One character is right justified in each eight bits; the most significant bit is zero. n may be any expression resulting in an unsigned decimal value in the range 1 through 28. Symbols used in an expres- sion must be previously defined. Anything in the Operand field following 2n characters is treated as comments. If less than 2n characters are detected before the end-of-statement mark, the remaining characters are assumed to be spaces, and are stored as such. The label represents the address of the first two characters. Example: 1 5 10 15 20 25 30 35 40 ---------------------------------------- TTYP ASC 3,ABCDE causes the following: ALPHABETIC 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- |///| A |///| B | --------------------------------------------------------------- |///| C |///| D | --------------------------------------------------------------- |///| E |///| sp | --------------------------------------------------------------- EQUIVALENT IN OCTAL NOTATION 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- |///| 1 0 1 |///| 1 0 2 | --------------------------------------------------------------- |///| 1 0 3 |///| 1 0 4 | --------------------------------------------------------------- |///| 1 0 5 |///| 0 4 0 | --------------------------------------------------------------- -------------------- [1] To enter the code for the ASCII symbols which perform some action, e.g., (CR) and (LF), the OCT pseudo instruction must be used. 4-17 ------+-----+----------------+-------- label DEC d1 [, d2, ...] comments DEC records a string of decimal constants into consecutive words. The constants may be either integer or real (floating point), and positive or negative. If no sign is specified, posi- tive is assumed. The decimal number is converted to its binary equivalent by the Assembler. The label, if given, serves as the address of the first word occupied by the constant. A decimal integer must be in the range of 0 to 2**15-1; it may assume positive, negative, or zero values. It is converted into one binary word and appears as follows: 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- | s | number | --------------------------------------------------------------- / / sign Example: 1 5 10 15 20 25 30 35 40 ---------------------------------------- INT DEC 50,+328,-300 causes the following (octal representation) 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- | 0 | 0 | 0 | 0 | 6 | 2 | --------------------------------------------------------------- | 0 | 0 | 0 | 5 | 1 | 0 | --------------------------------------------------------------- | 1 | 7 | 7 | 3 | 2 | 4 | --------------------------------------------------------------- A floating point number has two components, a fraction and an exponent. The fraction is a signed or unsigned number which may be written with or without a decimal point. The exponent is indicated by the letter E and follows a signed or unsigned decimal integer. The floating-point number may have any of the following formats: +-n.n +-n. +-n.nE+-e +-.nE+-e +-nE+-e 4-18 The number is converted to binary, normalized (leading bits differ), and stored in two computer words. If either the frac- tion or the exponent is negative, that part is stored in two's complement form. Word 1: 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- | s | fraction (most significant bits) | ---.----------------------------------------------------------- \ \ \ binary point 4-20 \ sign of fraction 4-22 Word 2: 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- | fraction | exponent | s | --------------------------------------------------------------- / / sign of exponent The floating-point number is made up of a 7-bit exponent with sign and a 23-bit fraction with sign. The number must be in the approximate range of 10**-38 and zero. Examples: 1 5 10 15 20 25 30 35 40 ---------------------------------------- DEC .45E1 DEC 45.00E-1 DEC 4500E-3 DEC 4.5 are all equivalent to .45 * 10**1 and are stored in normalized form as: 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- | 0 | 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 | --------------------------------------------------------------- 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- | 0 0 0 0 0 0 0 0 | 0 0 0 0 0 1 1 | 0 | --------------------------------------------------------------- 4-19 1 5 10 15 20 25 30 35 40 ---------------------------------------- DEC -.695,400E-4 are stored as: 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- | 1 | 0 1 0 0 1 1 1 0 0 0 0 1 0 1 0 | --------------------------------------------------------------- 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- | 0 0 1 1 1 0 1 1 | 0 0 0 0 0 0 0 | 0 | --------------------------------------------------------------- 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- | 0 | 1 0 1 0 0 0 1 1 1 1 0 1 0 1 1 | --------------------------------------------------------------- 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- | 1 0 0 0 0 1 0 1 | 1 1 1 1 1 0 0 | 1 | --------------------------------------------------------------- ------+-----+----------------+-------- label DEX d1 [, d2, ...] comments DEX, for the Extended Assembler, records a string of extended precision decimal constants into consecutive words within a program. Each such extended precision constant occupies three words as shown below: Word 1: 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- |Sm | Mantissa ----------------------------------> | ---.----------------------------------------------------------- Word 2: 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- | ------------------------------------------------> | --------------------------------------------------------------- Word 3: 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- | --------------------> | exponent |Se | --------------------------------------------------------------- 4-20 Legend: Sm = Sign of the mantissa (fraction) Se = Sign of the Exponent NOTE: A value is entered only if normalizing of the Mantissa is needed. An extended precision floating-point number is made up of a 39-bit Mantissa (fraction) and sign and a 70bit ex- ponent and sign. The exponent and sign will be zero if the Mantissa does not have to be normalized. This is the only form used for DEX. All values, whether they be floating-point, integer, fraction, or integer and fraction, will be stored in three words as just described. This storage format is basically an extension of that used for DEC, as previously decribed. Examples: DEX 12,-.45 are stored as: WORD 1 WORD 2 WORD 3 ------------------ ------------------ ------------------ | 0110000000000000 | | 0000000000000000 | | 0000000000001000 | ------------------ ------------------ ------------------ WORD 4 WORD 5 WORD 6 ------------------ ------------------ ------------------ | 1000110011001100 | | 1100110011001100 | | 1001101111111111 | ------------------ ------------------ ------------------ 4-21 ------+-----+----------------+-------- label OCT o1 [, o2, ...] comments OCT stores one or more octal constants in consecutive words of the object program. Each constant consists of one to six octal digits (0 to 177777). If no sign is given, the sign is assumed to be positive. If the sign is negative, the two's com- plement of the binary equivalent is stored. The constants are separated by commas; the last constant is terminated by a space. If less than six digits are indicated for a constant, the data is right justified in the word.A label, if used, acts as the address of the first constant in the string. The letter B must not be used after the constand in the Operand field; it is significant only when defining an octal term in an instruction other than OCT. Examples: 1 5 10 15 20 25 30 35 40 ---------------------------------------- OCT +0 OCT -2 NUM OCT 177,20405,-36 OCT 51,77777,-1,10101 OCT 107642,177077 OCT 1976 ILLEGAL: CONTAINS DIGIT 9 OCT -177777 OCT 177B ILLEGAL: CONTAINS CHARACTER B The previous statements are stored as follows: 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 --------------------------------------------------------------- | 0 | 0 | 0 | 0 | 0 | 0 | --------------------------------------------------------------- | 1 | 7 | 7 | 7 | 7 | 6 | --------------------------------------------------------------- NUM | 0 | 0 | 0 | 1 | 7 | 7 | --------------------------------------------------------------- | 0 | 2 | 0 | 4 | 0 | 5 | --------------------------------------------------------------- | 1 | 7 | 7 | 7 | 4 | 2 | --------------------------------------------------------------- | 0 | 0 | 0 | 0 | 5 | 1 | --------------------------------------------------------------- | 0 | 7 | 7 | 7 | 7 | 7 | --------------------------------------------------------------- | 1 | 7 | 7 | 7 | 7 | 7 | --------------------------------------------------------------- | 0 | 1 | 0 | 1 | 0 | 1 | --------------------------------------------------------------- | 1 | 0 | 7 | 6 | 4 | 2 | --------------------------------------------------------------- | 1 | 7 | 7 | 0 | 7 | 7 | --------------------------------------------------------------- | X | X | X | X | X | X | --------------------------------------------------------------- \ | 0 | 0 | 0 | 0 | 0 | 1 | \ --------------------------------------------------------------- | | X | X | X | X | X | X | | --------------------------------------------------------------- \ | \| / The result of / attempting to define an illegal constant is un- predictable 4-22 4.5 STORAGE ALLOCATION The storage allocation statement reserves a block of memory for data or for a work area. ------+-----+---------+-------- label BSS m comments The BSS pseudo operation advances the program or base page location counter according to the value of the operand. The Operand field may contain any expression that results in a opsitive integer. Symbols, if used, must be previously de- fined in the program. The label, if given, is the name as- signed to the storage area and represents the address of the first word. The initial content of the area set aside by the statement is unaltered by the loader. 4.6 ASSEMBLY LISTING CONTROL Assembly listing control pseudo instructions allow the user to control the assembly listing output during pass2 or 3 of the assembly process. These pseudo instructions may be used only with the source program is translated by the Extended Assem- bler provided for 8K or larger machines (8,192-word memory or larger). ------+-----+---------+-------- UNL comments Output is suppressed from the assembly listing, beginning with the UNL pseudo instruction and continuing for all instructions and comments until either an LST or END pseudo instruction is encountered. Diagnostic messages for errors encountered by the assembler will be printed, however, The source statement sequence numbers (printed in columns 1-4 of the source program listing) are incremented for the instructions skipped. 4-23 ------+-----+---------+-------- LST comments The LST pseudo instruction causes the source program listing, terminated by a UNL, to be resumed. A UNL following a UNL, a LST following a LST, and a LST not preceded by a NUL are not considered errors by the Assembler. ------+-----+---------+-------- SUP comments The SUP pseudo instruction suppresses the ouput of additional code lines from the source program listing. Certain pseudo instructions, because they result in using subroutines, generate more than one line of coding. These additional code lines are suppressed by a SUP instruction until a UNS or the END pseudo instruction is encountered. SUP will suppress additional code lines in the following pseudo instructions: ASC DIV FAD FSB OCT DLD FDV MPY DEC DST FMP The SUP pseudo instruction may also be used to suppress the listing of literals at the end of the source program listing. ------+-----+---------+-------- UNS comments The UNS pseudo instruction causes the printing of additional coding lines, terminated by a SUP, to be resumed. 4-24 A SUP preceded by another SUP, UNS preceded by UNS, or UNS not preceded by a SUP are not considered errors by the Assembler. ------+-----+---------+-------- SKP comments The SKP pseudo instruction causes the source program listing to be skipped to the top of the next page. The SKP instruction is not listed, but the source statement sequence number is incremented for the SKP. ------+-----+---------+-------- SPC n comments The SPC pseudo instruction causes the source program listing to be skipped a specified number of lines. The list output is skipped n lines, or to the bottom of the page, whichever occurs first. The n may be any absolute expression. The SPC instruction is not listed buyt the source statement sequence number is incremented for the SPC. ------+-----+---------+-------- HED m (heading) The HED pseudo instruction allows the programmer to specify a heading to be printed at the top of each page of teh source program listing. The heading, m, a string of up to 56 ASCII characters, is printed at the top of each page of the source program listing following the occurrence of the HED pseudo instruciton. If HED is encountered before the NAM or ORG at the beginning of a program, the heading will be used on the first page of the source program listing. A HED instruction placed elsewhere in the program causes a skip to the top of the next page. The heading specified in the HED pseudo instruction will be used on every page until it is changed by a suceeding HED instruction. The source statement containing the HED will not be listed, but the source statement sequence number will be incremented. 4-25 4.7 ARITHMETIC SUBROUTINE CALLS The members of this group of pseudo instructions request the Assembler to generate calls to arithmetic subroutines [1] external to the source program. These pseudo instructions may be used in relocatable programs only. The Operand field may contain any relocatable expression or an absolute expression resulting in a value of less than 100(8). ------+-----+---------+-------- MPY m[,I] comment =Dn =Bn Multiply the contents of the A-register by the contents of m or the quantity defined by the literal and store the product in registers B and A. B contains the sign of the product and the 15 most significant bits; A contains the least significant bits. ------+-----+---------+-------- DIV m[,I] comment =Dn =Bn Divide the contents of registers B and A by the contents of m or the quantity defined by the literal. Store the quotient in A and the remainder in B. Initially B contains the sign and the 15 most significant bits of the divident; A contains the least significant bits. ------+-----+---------+-------- FMP m[,I] comment =Fn Multiply the two-word floating-point quantity in registers A and B by the two-word floating-point quantity in locations m and m+1 or the quantity defined by the literal. Store the two- word floating-point product in registers A and B. ------+-----+---------+-------- FDV m[,I] comment =Fn Divide the two-word floating-point quantity in registers A and B by the two-word floating-point quantity in locations m and m+1 or the quantity defined by the literal. Store the two- word floating-point quotient in A and B. ---------------------- [1] Not intended for use with DEX formatted numbers. For such numbers JSB's to double precision subroutines must be used. See Relocatable Subroutines Manual (02116-91780). 4-26 ------+-----+---------+-------- FAD m[,I] comment =Fn Add the two-word floating point quantity in registers A and B to the two-word floating point quantity in locations m and m+1 or the quantity defined by the literal. Store the two-word floating point sum in A and B. ------+-----+---------+-------- FSB m[,I] comment =Fn Subtract the two-word floating point quantity in m and m+1 or the quantity defined by the literal from the two-word flating point quantity in registers A and B and store the difference in A and B. ------+-----+---------+-------- DLD m[,I] comment =Fn Load the contents of locations m and m+1 or the quantity defined by the literal into registers A and B respectively. ------+-----+---------+-------- DST m[,I] comment =Fn Store the contents of registers A and B in locations m and m+1 respectively. Each use of a statement from this group generates two words of instructions. Symbolically, they could be represented as follows: JSB <.arithmetic pseudo operation> DEF m[,I] An EXT <.arithmetic pseudo operation> is implied preceding the JSB operation. In the above operations, the Overflow bit is set when one of the following conditions occurs: Integer overflow Floating-point overflow or underflow Division by zero. Execution of any of the subroutines alters the contents of the E-Register. 4-27