Digital PDFs
Documents
Guest
Register
Log In
DEC-D8-ASAA-D
December 1968
48 pages
Original
2.3MB
view
download
Document:
dec-d8-asaa-d
Order Number:
DEC-D8-ASAA-D
Revision:
Pages:
48
Original Filename:
https://svn.so-much-stuff.com/svn/trunk/pdp8/src/dec/dec-d8-asa/dec-d8-asaa-d.pdf
OCR Text
PAL-D DISK ASSEMBLER DEC-D8-ASAA-D PAL-D DISK ASSEMBLER Programmer’s Reference Manual ApriI I968 For additional copies order No. DEC-DB-ASAA-D from Digital Equipment Corporation, Program Library, Maynard, Mass. Price $I .00 DIGITAL EQUIPMENT CORPORATION I MAYNARD. MASSACHUSETTS Copyright 1968 by Digital Equipment Corporation CONTENTS CHAPTER I INTRODUCTION PAL-D Language Syntax Legal Characters Illegal Characters Format Ettectors Statements Labels Operators 'V'V‘eiaia'edeeeeeeewewww Operands Comments Symbols Symbol Distinction Permanent Symbols —l ompw O User-Defined Symbols Symbolic Address Symbolic Operators Symbolic Operands Symbol Tables Direct Assignment Statements Numbers Arithmetic and Logical Operators Evaluating Expressions Address Assignments Current Address Indicator Indirect Addressing Autoindexing Literals Nesting Literals Instructions Memory Reference Instructions Paging CONTENTS (Cont) .7.I.2 Off—Page Referencing .7.2 Augmented Instructions .7.2.1 Operate Microinstructions .7.2.2 Input-Output Transfer Microinstructions CHAPTER 2 PSEUDO-OPERATORS NMNNN owomtnom Current Location Counter 2-] Extended Memory 2-] Radix Control 2-2 Listing Control 2-2 Text 2-2 Facility End of Program 2-3 End of File 2-3 Altering the Symbol Table 2—3 CHAPTER 3 OPERATING PROCEDURE 0000 Loading PAL-D 3-1 Saving PAL-D 3-2 Expanding User's Symbol Table 3—2 Using PAL-D 3-2 CHAPTER 4 PROGRAM PREPARATION AND ASSEMBLER OUTPUT #kA-b Program Tape 4-1 Assembly 4-2 .2.I Pass I 4-2 .2.2 Pass 2 4-2 .2.3 Pass 3 CHAPTER 5 ERROR DIAGNOSTICS APPENDIX A USA SCII CHARACTER SET APPENDIX B SYMBOL LIST HOW TO OBTAIN REVISIONS AND CORRECTIONS Notification of changes and revisions to currently available Digital software and of new software manuals is available from the DEC Program Library for the PDP-5, 8, 8S, 8I, Linc 8, the PDP-4, 7 and 9 is currently published in DECUSCOPE the magazine of the Digital Equipment Computer User's Society (DECUS). This information appears in a section of DECUSCOPE called "Digital Small Computer News". Revised software products and documents are shipped only after the Program Library receives a specific request from a user. DEC USCOPE is distributed periodically to both DECUS members and to non- members who request it. If you are not now receiving this information, you are urged to return the request form below so that your name will be placed on the mailing list. -Jznm_——_—-——_“—_~sl----mmm—am—‘t——:‘n-—r—n_—"—‘n—flm_——I l l l l l l l l l l 5 To: DECUS Office, Digital Equipment Corporation, Maynard, Mass. 01754 Cl Please send DECUS installation membership information. [:I Please send DECUS individual membership information. [I Please add my name to the DECUSCOPE non-member mailing list. i l l l l i l l l l l Name Company Address (Zip Code) CHAPTER I INTRODUCTION PAL-D, the acronym for _Program Assembly Language for the _Disk System, is the symbolic assembly program designed primarily for the 4K PDP-8 family of computers with disk or DECtape. The PAL-D Assembler makes machine language programming easier, faster, and more efficient. Basically, the Assembler processes the programmer's source program statements by translating mnemonic operation codes to the binary codes needed in machine instructions, relating symbols to numeric values, assigning absolute core addresses for program instructions and data, and preparing an output listing of the program, which includes notification of any errors detected during the assembly process. The PAL—D Assembler operates under the Disk Monitor the disk version of the System. The assembly system includes Symbolic Tape Editor for altering or editing the source language tape, the Disk Debugging Tape for debugging the obiect program by communicating with it in the source language, and various other utility programs. PAL-D requires a 4K TCOI DECtape unit, or both. PDP-8/I, 8, or 8/5 computer with a teleprinter, and a DF32 Disk or It can also use a high speed reader and punch, and up to three additional D532 Disk units. PAL—D LANGUAGE l.1 The PAL-D Assembler is compatible with the PAL III Assembler. However, PAL-D has the following additional features. Operators Symbols and integers may be combined by using the operators + - Literals Addition 8. Boolean AND Subtraction I Boolean Inclusive OR Symbolic or integer literals (constants) automatically assigned. are Text Facility Text facilities exist for single characters and blocks of text. Indirect Linkage Generation I . 2 Indirect links are automatically generated for off-page referencing. SYN TAX Programs processed under PAL-D are written using USA SCII characters. Appendix A contains a complete list of these characters with their octal code equivalents. I-I 1 .2.1 Legal Characters The following characters are acceptable to PAL-D. The alphabetic characters a. ABCD. b. . .XYZ The numeric characters 0123456789 c The special characters . __. + Space Separates symbols and numbers (see Section 1.5.1) Plus Combines symbols or numbers Minus Combines symbols or numbers Exclamation Mark Combines symbols or numbers Carriage Return Terminates a line (add) - (subtract) (inclusive OR) Formats symbols or numbers or source Tabulation tape output Assigns symbolic address Direct assignment of symbol values Terminates coding line (will not terminate comments) Comma Equal Sign Semicolon Dollar Sign Indicates end of pass Asterisk Sets current location counter; redefines origin Point d . Has value equal to current location counter (Period) Slash Indicates start of comment Ampersand Combines symbols or numbers Quote Generates USA SCll constant (AND) () Parentheses Defines literal on current page [J Brackets Defines page 0 literal Ignored characters Form-Feed Indicates the end of a source Used for Code 200 Used for leader/trailer leader/trailer Rubout Follows tabulation characters for Line-Feed timing purposes Follows carriage return and causes teleprinter paper to roll upward one line (i.e., nonprinting), the following symbols are used throughout this manual to represent their presence. I—I program Blank Tape Since certain characters are invisible .4 J logical page of Space Tabulation Carriage Return 1.2.2 Illegal Characters All characters other than those listed above are illegal when not in a comment or TEXT field and, being illegal, their occurrence causes the error message IC (Illegal Character) to be printed by PAL—D. l . 2 .3 Format Effectors Tabulations are usually used in the body of a source program to provide a neat page; they can separate fields from one another, as between a statement and a comment. For example, a line written GO, TAD TOTAL/MAIN LOOP is much easier to read if tabs are inserted to form GO, -'l TAD TOTAL—ti /MAIN LOOP Either the ";" statement terminator. (semicolon) or ”J " (carriage return-line feed) character may be used as a The. semicolon is considered identical to carriage return-line feed except that it will not terminate a comment. Example: TAD A The entire expression between the TAD B J /THIS IS A COMMENT; "/" (slash) and J (carriage return) is considered a comment. The semicolon also allows the programmer to place several lines of coding on a single line. If, for example, he wishes to write a sequence of instructions to rotate the contents of the accumulator and link six places to the right, it might look like RTR 2 RTR I RTRJ The programmer may place all three RTRs on a single line by separating them with the special character , and terminating the line with a carriage return. The above sequence of instructions can then be written RTR; RTR; RTRJ This format is particularly useful when setting aside a section of data storage for a list. IZ—word list could be reserved by LIST, A neat printout For example, a specifying the following format. 0; O; O; 0; O; O J O; O; O; O; O; O J (or program listing) makes subsequent editing, debugging, and interpretation much easier than when the coding is laid out in a haphazard fashion. 1 .3 STATEMENTS PAL—D source programs are usually prepared on a Teletype, with the aid of the Editor, sequence of statements. Each statement is written on a single line and is terminated by return-line feed sequence. are not a as a carriage PAL-D statements are virtually format free; that is, elements of a statement placed in numbered columns with rigidly controlled spacing between elements, as in punched-card oriented assemblers. There are four types of elements in a PAL-D statement which are identified by the order of appearance in the statement, and by the separating, or delimiting, character which follows or precedes the element. Statements are written in the general form label, operator operand/comment The Assembler interprets and processes these statements, generating one or more binary instructions or data words, or performing an assembly process. A statement must contain at least one of these elements and may contain all four types. 1.3.1 Labels A label is the symbolic statement in the program. l .3.2 name created by the source programmer to identify the position of the If present, the label is written first in a statement and terminated by a comma. Operators An operator may be one of the mnemonic machine instruction codes (see Appendix B), a pseudo-operation (pseudo-op) code which directs assembly processing. codes are described in Chapter 2. a or The assembly pseudo-op Operators are terminated with a space if an operand follows or with semicolon, slash, or carriage return. 1 .3.3 Operands Operands are usually the symbolic address of the data to be accessed when an instruction is executed, or the input data or arguments of a pseudo-op. a statement depends on the statement operator. comment 1 .3.4 In each case, interpretation of operands in Operands are terminated by a semicolon, a slash if a follows, or a carriage return-line feed. Comments The programmer may add notes to a statement following a slash mark. affect assembly processing or program execution, but are useful in the program or debugging . 1-4 Such comments do not listing for later analysis l .4 Symbols The programmer may create symbols to use as statement labels, as operators, and as operands. A symbol is a string of one or more alphanumeric characters delimited by a punctuation character. A symbol contains from one to six characters from the set of 26 alphabetic characters and ten digits 0 through 9; however, the first character must be alphabetic. Symbol Distinction 1.4.1 The PAL—D Assembler makes a distinction between the types of symbols it is processing. These types are a . Permanent symbols symbol whose value of 4000 (octal) is taken from PAL-D's permanent operation code symbol table. JMS b. a User-defined symbols HERE user-defined symbol; when used as a symbolic address tag, its value is a the address of the statement it tags l .4.1 .1 Permanent Symbols - (this value is assigned by PAL—D). PAL-D has in its permanent symbol table definitions of its operation codes, operate commands, and many input—output transfer (IOT) microinstructions (see Appendix B). PAL-D's permanent symbols may be used without prior definition by the user. 1 4.1 .2 if any, User-Defined Symbols are - User-defined symbols are composed according to the following rules. a. The characters must be b. The first character c Only the first six characters of any symbol are meaningful to PAL-D; the remainder, . alphabetic (A—Z) or numeric (0-9). must be alphabetic. ignored. Note that because of the third rule above, since the seventh character is a symbol such as INTEGER would be interpreted as INTEGE ignored. Remember, if symbols of more than six characters are used, the programmer must avoid defining two apparently different symbols whose first characters are identical. For example, the two symbols GEORGEl and GEORGE2 differ only in the seventh character, thus the Assembler treats them as being the same symbol, GEORGE. When the symbol field delimiter. following the space is a user-defined symbol, the space acts as an address Example: A, "2117;l CLAJ JMP,__,A 4/ 1-5 where A is user-defined symbol with the value 21 l 7. Address JMP lOl 000 000 000 (binary representation of permanent symbol A 000 Oil 001 ill The operation codes (op codes) are written more concisely in octal JMP) (binary representation of address A) inclusively ORed to form JMPA or The expression JMP A is evaluated as follows. as 101 001 Oil ill 5317. Symbolic Addresses l .4.3 A symbol used as a label to specify a symbolic address must appear first in the statement and must be immediately Followed by defined symbol can defined as a label comma. When used in this way, a symbol is said to be defined. reference an instruction or data word at any point in the program. only once. second or successive attempt is definition. a These are A symbol can A be If a programmer attempts to define the same symbol as a label again, the The Assembler recognizes only the first ignored and an error is indicated. legal symbolic addresses: ADDR, TOTAL, SUM, The following symbolic addresses are illegal: 7ABC, LABH, 1 .4.4 (first character must be alphabetic) (comma must immediately follow label) Symbolic Operators Symbols used as operators must be predefined by the Assembler or by the programmer. statement space, has no label, the operator may appear first in the statement, and must be terminated by a tab, semicolon, or carriage return. TAD PAGE ZIP 1 .4.5 If a The following are examples of legal operators: (a mnemonic machine instruction operator) (an Assembler pseudo-op) (legal only ifdefined by the user) Symbolic Operands Symbols used as operands must have a value defined by the user. These may be symbolic references to previously defined labels where the arguments to be used by this instruction are to be found, or the values of symbolic operands may be constants or character strings. TOTAL, The first operand, ACl , ACT by the user. TAD ACl + TAG specifies an accumulator register, determined by the value given to the symbol The second operand references a memory location whose name or symbolic address is TAG. 1—6 Symbol Tables 1.4.6 The Assembler processes symbols in source program statements by referencing its symbol tables which contain all defined symbols along with the binary value assigned to each symbol. Initially, the Assembler's permanent symbol table contains the mnemonic op codes of the machine instructions and the Assembler pseudo-op codes, as listed in Appendix B. As the source program is processed symbols defined in the source program are added to the user's symbol table. 1 .4.o.1 Direct Assignment Statements — The programmer inserts new symbols with their assigned values directly into the symbol table by using a direct assignment statement of the form symbol where the value may be a number or expression. = value For example, ALPHA=5 BETA=17 A direct assignment statement may also be used to give a new symbol the same value as a previously defined symbol. BETA=17 GAMMA=BETA The new symbol, GAMMA, is entered into the user's symbol table with the value 17. The value assigned to a symbol may be changed. ALPHA=7 changes the value assigned to the first example from 5 to 7. The user may also define symbols by use of the comma. When the first symbol of a statement is terminated by a comma, it is assigned a value equal to the current location counter *100 TAG, (CLC). For example, /set CLC (origin) to 100:) CLAJ JMP AJ B, O) A, DCA B.) The symbol TAG is assigned a value of 0100, the symbol B a value of 0102, and the symbol A a value of 0103. Direct assignment statements do not generate instructions or data in the obiect program. statements are used to 1.5 These assign values so that symbols can be conveniently used in other statements. NUMBERS Any sequence of numbers delimited by a punctuation character is interpreted numerically by PAL-D . , t 12 4372 The radix control used in number are to be pseudo-operators (pseudo—ops) indicate to the Assembler the radix to be interpretation (see Chapter 2). The pseudo-op DECIMAL indicates that all numbers interpreted as decimal until the next occurrence of the pseudo—op OCTAL. The pseudo—op OCTAL indicates that all numbers are to be interpreted as octal until the next occurrence of the pseudo-op DECIMAL. The radix is initially set to octal and remains octal unless otherwise specified. 1 .5.l Arithmetic and Logical Operators The arithmetic and logical operators are: + Plus 25 complement addition (modulo 4096) - 25 complement subtraction Minus (modulo 4096) I Boolean inclusive OR Exclamation Mark (union) & _. Boolean AND (intersection) Ampersand Interpreted as inclusive OR when used Space to separate two symbolic operators. Example: TAG, l .5.2 CLA L_.CLL J Evaluating Expressions Symbols and numbers (exclusive of pseudo—op symbols) may be combined by using the arithmetic and logical operators to form expressions. Expressions are evaluated from left to right. ' Value Value Value 1.6 A B A+ B A—B AI B A&B 0002 0003 0005 7777 0003 0002 0005 0000 0007 0005 0014 0002 0007 0700 0007 0707 0671 0707 Example: ADDRESS ASSIGNMENTS The PAL—D Assembler sets the origin, or starting address, of the source program to absolute location (address) 0200 unless the origin is specified by the programmer. As source statements are processed, PAL-D assigns consecutive memory addresses to the instructions and data words of the object program is done by incrementing the location counter each time a memory location is assigned. 1-8 . This A statement which generates a single object program storage word increments the location counter by one. may generate six storage words, thus Another statement incrementing the location counter by six. Direct assignment statements and some Assembler pseudo-ops do not generate storage words and therefore do not affect the location counter. Current Address Indicator l .6.l The special character current . (point or period) always has a value equal to the value of the It may be used as any integer or symbol location counter. (except to the left of an equal sign). Example: *200J JMP .+ 21 is equivalent to JMP 0202. Also, *3001 .+24OOJ will produce in location 0300 the quantity 2700. Consider *22002 CALL=JMS | 0027:.) The second line, CALL = JMS I ., . J does not increment the current location counter, therefore, 0027 is placed in location 2200 and CALL is placed in the user's symbol table with an associated value of 4600 (the octal equivalent of JMS 1.). 1.6.2 Indirect Addressing When the character I appears in a statement between a memory reference instruction and an oper- and, the operand becomes the address containing the address of the statement to be executed. Consider TAD 400 which is a direct address statement, where 400 is interpreted as the address containing the quantity to be added to the accumulator. Thus, if address 400 contains 0432, then 0432 is added to the accumulator. Now consider TAD I 400 which is an indirect address statement, where 400 is interpreted as the address of the address containing the quantity to be added to the accumulator. if address 400 contains 432, and address 432 contains Thus, 456, then 456 is added to the accumulator. When a reference is made to an address not on the same page as the reference, PAL-D sets the indirect bit reference (bit 3) of the machine instruction, generating an indirect address linkage to the off-page (see Paging and Off-Page Referencing, Sections l .7.1 .l and 1.7.1 .2). 1—9 In the case of several off-page references to the same address, the indirect address linkage will be generated only once. Example: A, *ZII7J CLAJ *26OOJ TAD_.A DC.A__.A The space preceding the user-defined symbol A acts as an address field delimiter. PAL-D will recognize that the address tag A is not on the current page (in this case 2600-2777) and will generate a link to it in the following manner. In location 2600, PAL-D will place the word (octal equivalent of TAD I 2777) I777 and in location 2777 (the last location on the current page) the word 2II7 (the actual address of A) will be placed. a When it sees the second reference to A it will use the previous link word rather than creating new one . PAL—D will recognize and generate an indirect address linkage only when the address referenced is to a location on another page, not the current page. The programmer must use the character I to indicate an explicit indirect address when indirectly addressing to a location on the current page. PAL-D cannot generate a link for an instruction that is already specified as being an indirect address. In this case, PAL-D will type the error message ll (Illegal Indirect); the error message is ignored and assembly is continued. I .6.3 Autoindexing Interpage references are often necessary for obtaining operands when processing large amounts of data. The PDP—8 computers have facilities to ease the addressing of this data. I0 to I7 (octal) are an When absolute locations indirectly addressed, the content of the location is incremented before it is used as address and the incremented number is left in the location. This allows the programmer to address consecutive memory locations using a minimum of statements. It must be remembered that initially these locations (I0 to I7) must be set to one less than the first desired address. Because of their characteristics, these locations are called autoindex registers. No incrementation takes place when locations I0 to I7 are addressed directly. Example: Statement is in location 500 Data is on the page starting at 5000 Autoindexing register I0 is used for addressing 1377 0477 3010 DCA 10 0500 1410 TAD I 10 ’ 0577 / set up auto / index with 4777 / C(10) is incremented to 5000 before (5000-1) TAD 0476 ° / 4777 use as address literal generated by PAL-D When the statement in location 500 is executed, the content of location 10 will be incremented to 5000 and the content of location 5000 will be added to the content of the accumulator. If the instruction TAD | 10 is re—executed, the content of location 5001 is added to the content of the accumulator, and so on. 1.6.4 Literals Symbolic and integer literals (constants) may be defined as shown below. cDAJ TAD (2).; DCA INDEX .2 The left parenthesis is a signal to the Assembler that the in the table at the top of the current page. are stored. This is the same table in which the indirect address linkages In the above example, the quantity 2 is stored in the first free location in a list beginning at the top of the current page an integer following is to be assigned a location (relative address 177), and the statement in which it appears is encoded with address referring to that location. A literal is assigned to storage the first time it is encountered; subsequent references will be to the same location. If the programmer wishes to assign literals to page 0 rather than the current page, he must use square brackets, or [ ], in place of parentheses. Whether using parentheses or square brackets, the right closing member is optional and may always be replaced with a carriage return. TAD 1.6.4.1 Nesting - (777.; Literals may be nested as shown below. *200 2 TAD (TAD (30 a will generate 0200 1276 0376 1377 (literals assigned to locations 0377 0030 0377 and 0376; top of current page) This type of nesting may be carried to many levels. Literals are stored on each page may be placed on page 0) starting at relative address I77 (only If literals are being generated for some nonzero . is set to another page, the current page literal buffer is punched out during to the I2710 I778 literals or page and then the origin pass 2. If the origin is reset previously used page, the same literal will be generated if used again. If a single character is preceded by a quote (”) character is inserted instead of taking the letter as a Example: , the 8-bit value of the USA SCII code for that symbol. CLAo/ TAD ("A I will place the constant 0301 in the accumulator. I.7 INSTRUCTIONS There are two basic groups of instructions: reference instructions require an operand; I .7.l memory reference and augmented. Memory augmented instructions do not require an operand. Memory Reference Instructions In PDP-8 computers, some instructions require a reference to They are appropriately memory. designated memory reference instructions, and take the following format. OPERATION CODES 0-5 MEMORY PAGE A r PM fifi 0 1 2 3 W4 INDIRECT ADDRESSING 4 5 6 7 8 9 10 11 % J Y ADDRESS Memory Reference Instruction Bit Assignments Bits 0 through 2 contain the operation code of the instruction to be performed or JMP) . Bit 3 tells the computer if the instruction is indirect, that (AND, TAD, DCA, JMS, or is, if the address of the instruction specifies the location of the operand, or if it specifies the location of the address of the operand. tells the computer if the instruction is through II referencing the current page or page zero. ( 7 bits) to specify an address. In these 7 bits, 200 octal or This leaves bits 5 I28 decimal locations may be specified; the page bit increases accessible locations to 400 octal or 256 decimal. The address field of a memory reference instruction Example: A=27O J *200 c' TAD I-I2 A-20 J Bit 4 may be any valid expression. produces, in location 200, the word 1250 001 which in binary is 010 000 101 which is also TAD 250. 1 .7.1 .1 Mtg - To ease the programmer's addressing problems, divides memory into sectors called pages. 0 to 177 (octal) on that page. a convention has been defined that Each page contain 200 octal locations (128 decimal) numbered There are 40 octal or 32 decimal pages numbered 0 to 37 (octal) examples of page numbers and the absolute and relative locations (addresses) are shown below. . Some It must however, that there is no physical separation of pages in memory. be borne in mind, Absolute Relative Eggs Address Address 0 0 1 200 2 400 36 7400 37 7600 — — - - - 177 0 377 0 577 0 7577 0 7777 0 - 177 - — — - 177 177 177 177 The Following table offers a comparison of specific absolute and relative addresses on the same page . Absolute Address Relative Address 0 10 10 3 617 17 12 2577 177 31 6255 55 37 7777 177 133% Since only seven bits are necessary to address 200 octal for this function 1 .7.1 .2 locations, bits 5 to 11 are reserved . Off-Page Referencing from bit 4 of the instruction. - The page on which an absolute address is contained can be determined If bit 4 is a 0, the address refers to a location on page 0; if bit 4 is a 1, the address refers to a location on the current (same) page, that is, the some memory page as the instruction. Augmented Instructions 1 .7.2 Augmented instructions are divided into two groups: Operate and input-output transfer microinstructions. 1.7.2.1 Group are Operate Microninstructions — Within the operate group there are two 1 microinstructions are principally for clear, complement, rotate, and increment operations and designated by the presence of a O in bit 3 of the machine instruction word. CLA CMA ROTATE AC ANDL RIGHT F—H ,__~_fi r___A._fi OPERATION CODE 7 A r ‘ O 2 1 3 4 groups of microinstructions. 5 6 7 (See Appendix B.) ROTATE 1 POSITION IF AO, ZPOSITIONS IFAt f—A—fi 8 9 11 10 C_Y__J W—J W4 \_.Y__J O_Y__J CONTAINS CLL CML ROTATE AC AND L IAC A O TO SPECIFY GROUPt LEFT Group 1 Operate Microinstruction Bit Assignments Group 2 microinstructions are used principally in checking the content of the accumulator and link and, based on the check, continuing to or skipping the next statement. Group 2 microinstructions are identified by the presence of a 1 in bit 3 and a O in bit 11 of the machine instruction word (See Appendix B). REVERSE SKIP SENSING OF OPERATION CODE 7 CLA A f 0 1 2 3 4 BITS SZA r—J_\ f——“—'\ N 5 6 HLT 5,6,7 /—~—\ /——~—\ 7 8 11 10 9 \—v--’ W L_Y__J W4 CONTAINS A1 TO SPECIFY GROUP 2 SMA SNL OSR CONTAINS AO TO SPEC‘EY GROUPZ Group 2 Operate Microinstruction Bit Assignments Group 1 and group 2 microinstructions can not be combined because bit 3 determines only one or the other. Within Group 2, there are two groups of skip instructions. OR group and the AND group. They may be referred to as the AND Group OR Group SMA SPA SZA SNA SNL SZL The OR group is designated by a O in bit 8, the AND group by a l in bit 8. OR and AND group instructions cannot be combined because bit 8 determines only one or the other. If the programmer does combine under which a a. legal skip instructions, it is important to note the conditions skip may occur. QR Group — If these skips are combined in a statement, the inclusive OR of the conditions determines the skip. SZA SNL The next statement is skipped if the accumulator contains 0000, the link is a or l, or both conditions exist. b. determines the AND Group skip - If the skips are combined in a statement, the logical AND of the conditions . SNA SZL The next statement is skipped only if the accumulator differs from 0000 and the link is O. 1 .7.2.2 Input-Output Transfer Microinstructions - These microinstructions initiate operation of peripheral equipment and effect information transfer between the central processor and the input-output device B (5). This is the principal function of the input-output transfer (IOT) microinstructions. lists all valid IOT microinstructions, and each is discussed in detail in the User's Handbook. Appendix CHAPTER 2 PSEUDO-OPERATORS The programmer may use pseudo-operators (pseudo-ops) to direct the Assembler to perform certain tasks or to interpret subsequent coding in a certain manner. Some pseudo-ops generate storage words in the object program, other pseudo—ops direct the Assembler on how to proceed with the assembly. Pseudo-ops are maintained in the Assembler's permanent symbol table. The function of each PAL-D pseudo-op is described below. 2.] CURRENT LOCATION COUNTER The programmer may use the PAGE pseudo-op to reset the current location counter (CLC) to the first location on a specified page. PAGE without an argument, the CLC is reset to the first location on the next succeeding page. Thus, if a program is being assembled into page I and the programmer wishes to begin the next segment of his program on page 2, he need only insert JMP .—71 PAGE, as follows. (Last location used on page I) PAGE I CLAJ PAGE n resets a the CLC to the first location of page n, where n is an integer, previously defined symbol, or a symbolic expression. Example: PAGE 2 PAGE 6 2.2 (First location on page 2) (sets the CLC to location 400) (sets the CLC to location I400) EXTENDED MEMORY When using more than one memory bank, the pseudo-op FIELD instructs the Assembler to output a field setting. FIELD n where n is an integer, defined symbol, or a a previously symbolic expression within the range 0 S n 57. This pseudo-op causes a field setting (binary word) of the form II XXX 000 to be output on the binary tape during pass 2. where 000 _<_XXX _<_ I II This word is interpreted by the loading information from the Loader into the new field. 2—I Loader, which then begins RADIX CONTROL 2.3 Integers used in a source program are usually taken as octal numbers. If, however, the programmer wishes to have certain numbers treated as decimal, he may use the pseudo-op DECIMAL. all integers in subsequent coding are taken as decimal until DECIMAL the occurrence of the pseudo-op OCTAL. OCTAL resets the radix to its original octal base. LISTING CONTROL 2.4 During pass 3, a listing of the source program is printed (punched). The programmer may, however, control the output of his pass 3 listing by use of the pseudo-op XLIST. Those portions of the source program enclosed by XLIST will XLIST not appear in the pass 3 listing. TEXT FACILITY 2.5 The pseudo-op TEXT enables the user to represent a character or string of characters in USA SCII code trimmed to six bits and packed two characters to a word. are The numerical values generated by TEXT left-iustified in the storage words they occupy, with the unused bits of the last word filled with 05. A string of text may be entered by giving the pseudo-op TEXT followed by a space, a delimiting character, a string of text, and the same delimiting character. Example: TEXT“ ASTRING OF TEXTA The first printing character following TEXT is taken as the delimiting character, and the text string is the characters which follow until the delimiting character is again encountered. If the example above were at location 0200, the pass 3 200 2324 201 221 1 202 1607 203 4017 204 0640 205 2405 206 3024 207 0000 listing would be as follows. /ST /RI /NG /.__, 0 /F /TE /XT /zero filled .__. NOTE With TEXT, any printing character may be used as a delimiting character. 2-2 END OF PROGRAM 2.6 The special symbol $ (dollar sign) indicates the end of a program. When the Assembler encounters the $, it terminates the pass. 2.7 END OF FILE The pseudo-op PAUSE signals the Assembler to stop processing the current current pass is not input file. The terminated, and processing continues when the user types TP on the Teletype. When processing a segmented program, the programmer must use the PAUSE pseudo-op as the last statement of each segment to halt processing, giving him time to call (or insert, if paper tape is being used) the succeeding segment of his program. 2.8 ALTERING THE SYMBOL TABLE There are two pseudo-ops that may be used to alter the permanent symbol table during pass l. EXPUNGE Erases the entire symbol table, except for pseudo-ops. FIXTAB FIX the symbol TABle. are All symbols currently in the symbol table made permanent. Example: EXPUNGE J TAD = TOOOJ FlXTABJ will place the symbol TAD in the permanent symbol table. symbols are not typed out with the users symbols on PASS 2. All other symbols will be erased. Permanent CHAPTER 3 LOADING AND OPERATING PROCEDURES The user receives the PAL-D Disk Assembler in binary format on 8-channel tape. punched paper The Assembler is incorporated in the system by loading the paper tape into core using the Disk Monitor System (Monitor). Then the Assembler may be saved on the disk or DECtape as explained below. If the Monitor is not present on your disk or DECtape, build it according to instructions in the Disk Monitor System (DEC-D8-SDAA-D). LOADING PAL-D 3.] PAL-D is loaded in two passes. are The procedure for the two-pass load follows (Loader responses underlined). _._LOAD1 call Loader from disk (2 indicates carriage return) *IN-R: ,) input to be from high speed reader; T: would indicate input from Teletype reader i: Loader found device R: valid two-pass load is specified *OPT-Z 2 control is to be returned to the Monitor after loading tape into .51.: J core; 7600 I would also transfer control to the Monitor after loading the tape Loader is waiting for user to put paper tape in reader and type TP. After reading tape into core, Loader waits for user to remove tape If checksum error occurs, Monitor types ? in place and type TP. of l. Loader is waiting for user to put paper tape in reader for second pass and type lP. After reading tape on second pass, Loader is waiting for user to remove l<l P>l<l P>l<lP>_l_<l P> tape and type TP. Again, checksum error will cause ? to be typed in place of 1. NOTE lP indicates CTRL-P, and< >indicates that the enclosed portion is not echoed when the user types). 3-] (printed 3.2 SAVING PAD-D PAL—D may be saved on the system device as a system program. This is done by typing the following: 0—,3377 3600- 4377, 4600, 5200, 6200- 6577, .SAVE PALD! V "' Progam ‘J 7000— 6200 7577; JV One Page Entry Save Point Name Multiple Page Save {1 : System Program Program User The PAL-D Assembler in now saved as a system program on the system device. The programmer may now type PALDJ which brings the Assembler into core for use with symbolic source programs. 3.2.l Expanding User's Symbol Table The user's symbol table can hold T6010 user-defined symbols. This may be expanded by saving on the system device a user file named .SYM which can be used by PAL-D to store extra symbols. The symbol table can be Each user—defined symbol occupies four words. locations by saving a file with the following statement. L 3.3 SAVE expanded by 12810 or 2008 .SYM:0-l77;0 1 USING PAL-D PAL-D is transferred from the system device into core using the Monitor. The user begins by typing _._PALD J PAL-D requests on output file by typing *OUTThe user selects the output device by typing (low speed reader/punch), or T: J for the Teletype R: J for the high speed reader/punch, Szname J for output to the system device as file name: PAL-D now types *IN- 3-2 or and waits for the user to select the input files. Up to five input files may be specified (e.g., R:, R:, S:name, R:, R: J ),but in this example the user selected input from the high speed reader/punch R:.) NOTE PAL—D checks the validity of each selected file (i.e., valid only if the file was declared when building Moni- tor), and types valid file. * for each valid file and ? for an in- When PAL-D finds an invalid file it returns control to the Monitor, in which case, the user must start again by calling PALD J . When PAL-D is satisfied that the input file(s) is valid, it will request third pass listing option by typing *OPT— The user may type T .1 meaning listing and symbols are to be produced on R J 1 the Teletype, or meaning listing and symbols are desired on high speed punch, or meaning symbols only same as (any other character means no When the high speed punch is selected as a third pass) listing device, the alphabetic symbol table produced at the end of pass 2 is also produced on the high speed punch. PAL-D will now proceed with the assembly, pausing only when user intervention is required (i.e., placing a new paper tape in the reader, turning on the punch, etc.) PAL-D will type an up-arrow user . On these occasions, (T ) on the Teletype to indicate user intervention is required. is ready to continue with the assembly, he types CTRL-P When the ( T P) (which does not echo). At the end of pass 2, PAL-D outputs the user's symbol table in alphabetical order (in addition to the assembled binary output). This symbol table listing may be terminated at any time by typing CTRL—P, and PAL—D will proceed to initiate pass 3, if requested. Assembly may be terminated and control returned to the Monitor at any time by typing CTRL-C (TC) . When the assembly is complete, control will automatically be returned to the Monitor. CHAPTER 4 PROGRAM PREPARATION AND ASSEMBLER OUTPUT The source language tape (symbolic tape) is prepared in USA SCH code on 8-channel punched paper tape or as a named file on the disk or 4.1 DECtape using the Editor. PROGRAM TAPE Since the Assembler ignores certain characters, these may be used Freely to produce a more readable symbolic source tape. These useful characters are tab and form-feed. The Assembler will also ignore extraneous spaces, carriage return-line feed combinations, rubouts, and blank tape. The program body consists of statements and pseudo-ops. dollar sign ($). The program is terminated by the If the program is large, it may be segmented by use of the pseudo—op PAUSE. This often facilitates editing the source program since each section is physically smaller. The Assembler initially sets the origin (current location counter) of the source program to 0200. The programmer may reset the current location counter by use of the asterisk. The following two programs are identical except that format effectors were used in the second printout. *200 /EXAMPLE OF FORMAT /GENERATOR BEGIN, o/START OF PROGRAM KCC KSF/WAIT FOR FLAG .-T/FLAG NOT SET YET KRB/READ IN CHARACTER JMP DCA CHAR TAD CHAR TAD MSPACE/IS IT A SPACE? SNA CLA HLT/YES JMP BEGIN + 2/NO: INPUT AGAIN CHAR, O/TEMPORARY STORAGE MSPACE, -240/—ASCII EQUIVALENT /END OF EXAMPLE $ *200 /EXAMPLE OF FORMAT /GENERATOR BEGIN, o /START OF PROGRAM KCC KSF JMP .-T /WAIT FOR FLAG /FLAG NOT SET YET 4-1 /READ IN CHARACTER KRB DCA CHAR TAD CHAR /IS IT A SPACE? TAD MSPACE SNA CLA /YES /NO: INPUT AGAIN /TEMPORARY STORAGE /—ASCII EQUIVALENT HLT JMP BEGIN+ 2 o CHAR, MSPACE, -24o /END OF EXAMPLE $ Both of these programs will produce the same binary code. The second, however, is easier to read. ASSEMBLY 4.2 PAL-D is a two-pass assembler with an optional third pass which produces a side-by-side assembly listing of the symbolic source statements, their octal equivalents, and assigned absolute addresses 4.2.1 . Passl During pass 1, PAL—D processes the source tape the definitions of all symbols used. (or file) and places in its user's symbol table The user's symbol table is printed (or punched) at the end of pass 2. If any symbols remain undefined at the end of pass 1, the US (Undefined Symbol) diagnostic is printed during pass 2 when the undefined symbol is encountered (see Error Diagnostics). The symbol table is printed (or punched) in alphabetical order on either the teleprinter or high-speed punch. The punched symbol table may be used to expand DDT-8s symbol table for use in program debugging. If the program listed above were assembled, PAL-D would output the following symbol table. 4.2.2 BEGIN 0200 C HAR 0213 MSPACE 0214 Pass2 During pass 2, PAL-D processes the source tape (or file) and generates binary output using the symbol table equivalences defined during pass I . The binary output may be loaded in core by the Disk Monitor System Binary Loader. The binary coded tape (or file) consists of leader code, an origin setting, and data words. Every occurrence in the source program of an asterisk causes a new origin setting in the binary output. At the end of the binary coded tape, a binary checksum is produced and trailer code is generated. 4-2 When using the low speed paper tape punch, and will be preceded and followed by rubouts. rubouts diagnostic messages are both typed and punched The Binary Loader will ignore everything enclosed within . 4.2.3 Pass 3 During pass 3, PAL—D processes the source tape (or tile) and prints out a side—by—side listing of the generated octal code and the original source the pass 3 language. It the program shown above were assembled, listing would be *200 /EXAMPLE OF FORMAT /GENERATOR /START OF PROGRAM 0 0200 0000 0201 6032 KCC 0202 6031 KSF 0203 5202 JMP 0204 6036 KRB 0205 3213 DCA CHAR 0206 1213 TAD CHAR 0207 1214 TAD MSPACE 0210 7650 SNA CLA 0211 7402 HLT 0212 5202 JMP BEGIN+2 /NO: 0213 0000 O 0214 7540 BEGIN, CHAR, MSPACE, -240 /END OF EXAMPLE .—1 /WAIT FOR FLAG /FLAG NOT SET YET /READ IN CHARACTER /IS IT A SPACE? /YES INPUT AGAIN /TEMPORARY STORAGE /-ASCII EQUIVALENT CHAPTER 5 ERROR DIAGNOSTICS PAL-D makes many error checks as it processes source detected, the Assembler prints an error message. language statements. When an error is The Format oF the error messages is ADDRESS ERROR CODE where ERROR CODE is a two-letter code which specifies the type oF error, and ADDRESS is either the absolute octal address where the error occurred or the address oF the error relative to the last symbolic tag (iF there was one) on the current page. The programmer should examine each error indication to determine whether correction is required. PAL-D's error messages are listed and explained below. Error Code BE Explanation Two PAL-D internal tables have overlapped can - This situation usually be corrected by decreasing the level oF literal nesting or number oF current page literals used prior to this point on the page. DE Systems device error - An error was detected when trying to read or write the system device; aFter three Failures, control is re- turned to the Monitor. DF Systems device Full - The capacity oF the systems device has been exceeded; assembly is terminated and control is returned to the Monitor. IC Illegal character a comment nor a - An illegal character was processed neither in TEXT Field; the character is ignored and the assembly continued. ID Illegal redeFinition ot a symbol — An attempt was made to give a previously deFined symbol a new value by other means than the equal sign; the symbol was not redeFined. IE Illegal equals An equal sign was used in the wrong context. — Examples: TAD A += B (the expression to the leFt oF the equal sign is not single symbol or, the expression to the right oF the equal sign was not previously defined) a A +B=C 11 Illegal indirect not -— An oFF-page reFerence was made; a link could be generated because the indirect bit was 5-] already set. Error Code Explanation Example: *200 TAD I A 1 PAGE J 7240 J A, PE Current nonzero page exceeded An attempt a. override a literal with an instruction, b. override an instruction with a corrected PH - was made to or literal; this can be by (l) decreasing the number of literals on the page or (2) decreasing the number of instructions on the page. Phase error - PAL-D has received input files in an incorrect order; assembly is terminated and control is returned to the Monitor. SE Symbol table exceeded — Assembly is terminated and control is returned to the Monitor; the symbol table may be expanded to contain up to 1184 user symbols on US by saving a file named .SYM the system device. Undefined symbol - A symbol has been processed during pass 2 that was not defined before the end of pass 1 ZE Page 0 exceeded - . Same as PE except with reference to page 0. APPEN DIX A USA SCII CHARACTER SET Character Code Code 301 260 302 261 303 262 304 305 306 N<X§<CHmWQT02§FKLHIQWUOW> Character 307 310 31 1 312 313 314 \OCDNO‘UW-kwM-‘O 263 264 265 Character 241 0m%:“' 90» 270 271 geVA" + 244 245 246 250 251 252 253 254 315 316 242 243 247 266 267 Code 255 . 256 31 7 \ 257 320 .- 272 321 273 322 275 326 LAP-1.0”" 327 TAB 21 1 330 331 LINE FEED 21 2 CARRIAGE-RETURN 21 5 332 SPACE 240 RUBOUT 377 323 324 325 BELL 277 333 335 207 ,APPEN DIX B SYMBOL LIST Mnemonic Code Operation Event Time MEMORY REFERENCE INSTRUCTIONS AND 0000 TAD 1000 ISZ 2000 DCA 3000 JMS 4000 JMP 5000 logical AND complement add increment & skip it zero deposit & clear AC jump to subroutine jump 2s GROUP 1 OPERATE MICROINSTRUCTIONS NOP 7000 no IAC 7001 increment AC RAL 7004 rotate AC & link left one RTL 7006 rotate AC & link left two RAR 7010 rotate AC & link right one RTR 7012 rotate AC & link right two CML 7020 CMA 7040 complement link complement AC CLL 7100 clear link CLA 7200 clear AC operation GROUP 2 OPERATE MICROINSTRUCTIONS halts the computer HLT 7402 OSR 7404 inclusive OR switch register with AC SKP 7410 skip unconditionally skip on nonzero link skip on zero link skip on zero AC skip on nonzero AC skip on minus AC skip on plus AC (zero is positive) SNL 7420 S-ZL 7430 SZA 7440 SNA 7450 SMA 7500 SPA 7510 COMBINED OPERATE MICROINSTRUCTIONS CIA 7041 complement & increment AC STL 7120 set GLK 7204 STA 7240 LAS 7604 get link (put link in AC, bit 11) set AC -1 load AC with switch register link to 1 = PSEUDO-OPERATORS DECIMAL EXPUNGE FIELD FIXTAB I OCTAL PAGE B-1 —L—k—l—A—d PSEUDO—OPERATORS PAUSE TEXT XLIST Z Code Mnemonic Event Time Operation IOT MICROINSTRUCTION 5 Program Interrupt ION 6001 turn IOF 6002 turn KSF 6031 KCC 6032 1 skip if keyboard/reader flag clear AC & keyboard/reader flag KRS 6034 read keyboard/reader buffer KRB 6036 clear AC & read keyboard buffer, & clear interrupt on interrupt off Keyboard/Reader = keyboard flag Teleprinter/Punch TSF 6041 TCF 6042 TPC 6044 TLS 6046 skip if teleprinter/punch flag clear teleprinter/punch flag load teleprinter/punch buffer, = 1 select & print load teleprinter/punch buffer, select & print, and clear teleprinter/punch flag High-Speed Reader (Type PC02) 1 RSF 6011 skip if reader flag RRB 6012 read reader buffer & clear flag RFC 6014 clear flag & buffer & fetch character = High-Speed Punch (Type PC03) PSF 6021 PCF 6022 PPC 6024 PLS 6026 Disk File and Control (type DF32) DCMA 6601 DMAR 6603 1 skip if punch flag clear flag & buffer load buffer & punch character clear flag & buffer, load & punch = ' clear disk memory request & interrupt flags load disk from AC, clear AC, read into core, clear interrupt flag DMAW load disk from AC, write onto disk from core, 6605 clear interrupt flag DCEA 6611 A clear disk extended address & memory address extension register ‘ 1 DSAC 6612 skip if address confirmed flag DEAL 6615 clear disk extended address & memory address DEAC 6616 = extension register & load same from AC clear AC, load AC from disk extended address 1 register, skip if address confirmed flag or data if late, error, request skip parity 0 (no error) write lock switch flag = DFSE 6621 = B-2 Mnemonic Code DFSC 6622 DMAC 6626 Event Time Operation sl<ip if completion flag completed) I 1 (date transfer clear AC, load AC from disk memory address register DECtape Transport (Type TU55) and Control (Type TCOT) DTRA 676T read status register A DTCA 6762 clear status register A DTXA 6764 load status register A DTSF 677T skip on flags DTRB 6772 read status register B DTLB 6774 load status register B Memory Extension Control (Type 183) CDF 62nl CIF 62n2 change to data field n change to instruction field n RDF 6214 read data field into AC 6-8 RIF 6224 read instruction field into AC 6-8 RMF 6244 restore memory RIB 6234 read field interrupt buffer B—3 (ADM—‘wM—‘ ......................................................................................... : ............................................................................ Fold Here Do Not Tear — Fold Here and Staple ........................................................... FIRST CLASS PERMIT NO. 33 MAYNARD, MASS. BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATES Postage will be paid by: mflgfl'au Digital Equipment Corporation Software Quality Control Building 12 146 Main Street Maynard, Mass. 01754 PAL-D DISK ASSEMBLER PROGRAMMER'S REFERENCE MANUAL DEC-DB-ASAA-D READER’S COMMENTS Digital Equipment Corporation maintains a continuous effort to improve the quality and usefulness of its publications. To do this effectively, we need user feedback: your critical evaluation of this manual and the DEC products described. Please comment on this publication. For example, in your judgment, is it complete, accurate, well—organized, well- written, usable, etc? Did you find this manual easy to use? What is the most serious fault in this manual? What single feature did you like best in this manual? Did you find errors in this manual? Please describe. Please describe" your position. Name Organization Street State DIGITAL EOUIPMENT CORPORATION PRINTED IN O MAYNARD. MASSACHUSETTS U.S.A.
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies