Digital PDFs
Documents
Guest
Register
Log In
DEC-08-ASA
December 1969
36 pages
Original
0.9MB
view
download
Document:
dec-08-asab-d
Order Number:
DEC-08-ASA
Revision:
Pages:
36
Original Filename:
https://svn.so-much-stuff.com/svn/trunk/pdp8/src/dec/dec-08-asa/dec-08-asac-d.pdf
OCR Text
DEC-OB-ASAC-D PAL III PDP—8 SYMBOLIC ASSEMBLER PROGRAMMING MANUAL For additional copies order No. DEC—08-ASAC—D From Program Digital Equipment Corporation, Maynard, Massachuseffs DIGITAL EQUIPMENT CORPORATION . MAYNARD, Library, Price $1.00 MASSACHUSETTS 1st Printing August 1965 2nd Printing Rev June 1967 3rd Printing November 1967 4th Printing Rev May 1968 5th Printing Printing October 1968 6th Printing February 1969 Copyright©1965 by Digital Equipment Corporation 1967 1968 1969 Instruction times, operating speeds and the like are in- cluded in this manual forreference only; they are not to be taken as specifications. The following are registered trademarks of Digital Equipment Corporation, Maynard, Massachusetts: DEC PDP FLIP CHIP FOCAL DIGITAL COMPUTER LAB PREFACE The PDP-8 comes to the user complete with an extensive selection of system programs and routines making the full data processing capability of the new computer immediately available to each user, many commonly experienced initial eliminating programming delays. The programs described in these abstracts come from two sources, past programming effort on the PDP-5 computer, and present and continuing programming effort on the PDP—8. Thus the PDP-8 programming system takes advantage of the many man—years of program development and field testing by PDP—5 users. Although in many cases PDP—8 programs originated as PDP—5 programs, all utility and Functional program documentation is issued in a new, recursive Format introduced with the PDP—8. Programs written by users of either the PDP—5 or the PDP-8 and submitted to the users' library (DECUS — Digital Equipment Corporation Users' Society) are immediately available to PDP—8 users. Consequently, users of either computer can take immediate advantage of the continuing program developments for the other. ... III CONTENTS Page _C_h_a__pt_er I INTRODUCTION 2 ILLUSTRATIONS OF PDP-8 ASSEMBLER FEATURES ..................................................... ........................ 2-] ............................................. 2—l ............................................... 2—I The Location Counter Coding Illustrations 3 THE SOURCE LANGUAGE The Character Set ............................................. 3-1 ................................................ 3-I .............................. . ....................... 3—l ............................... . ....................... 3—I Letters Digits Punctuation Characters .................... 3—l 3-2 Illegal Characters ............................................ 3-2 ................ 3—2 ..................................................... 3-2 ............................ 3-3 ............................................. 3—3 ................................................ 3—4 ...................................................... 3-5 ............... Symbol ..... ...... Parameter Assignments Symbol Definition Expressions . Comments ...... . Pseudo-Instructions . .............. ............. . . ......... 3-8 ................................................ 3—9 ............................................... 3-9 ..................... 4—I .................................................... 4-I PROGRAM PREPARATION AND ASSEMBLER OUTPUT Program Tape OPERATING INSTRUCTIONS Summary . .......................................... Current Address Indicator 6 . ............................................ Number 5 ................... Ignored Characters Elements 4 I—I .......................................... ........................................................ SYMBOL TABLE ALTERATION ......................................... 5-] 5-2 6—I CONTENTS (continued) Page Appendix I SYMBOL LISTS 2 ASCII CHARACTER SET ............................................... A1—] ................................................. A2-1 ........ . vi CHAPTER 1 INTRODUCTION The use of an assembly program has become standard practice in the programming of digital computers. Use of an assembler permits a programmer to code in a more convenient The advantages of this practice are widely recognized: language than basic machine code. Easily recognized mnemonic codes are used in— stead of numeric codes; instructions or data may be referred to by a symbolic name; decimal data may be used as such with the assembler making the required decimal-to-binary conversion; programs may be al— tered without extensive changes in the source language; and debugging is simplified. The basic process performed by the Assembler is the substitution of numeric values for symbols, according to associations found in the symbol table. In addition, the user may request that the Assembler itself as- sign values to the user's own symbols at assembly time. These symbols are normally used to name memory locations, which may then be referenced by name. The ability to use mnemonic names to represent machine instructions is of great value. minds the user of the Two's complement ADdition instruction, while the number quently, the instructions are easier to remember when mnemonics are used. names. The name TAD re— Iflflg does not. Conse— The same is true of location It is much easier to associate the name TOTAL with the location containing the accumulated total than it is to remember that location I374 contains the total. Another advantage is that, since the assignment of absolute numbers to symbolic locations is done by the Assembler, the updating of a program by adding or removing instructions is simplified. In addition to translating statements directly into their binary equivalents, the Assembler will accept in— structions for performing translations. but they do not generate binary codes. These instructions may not look different from other instructions, For this reason, they are referred to as pseudo—instructions. For example, the pseudo-instruction DEClMAL tells the Assembler that all numbers following in the program are to be taken as decimal rather than as octal has no binary equivalent in the obiect program . This instruction is important to the assembly process but . Certain other features of assembly can be directed to the Assembler by the setting of the switch register, abbreviated SR. The PDP-8 Assembly System consists ofthe Assembler (PAL III) and the Binary Loader (DEC-O8— LBAA-PM) source program prepared in the source . language using ASCII code is translated by the Assembler into a binary object tape in two passes through the Assembler. Loader into the computer ready for execution. I—I The object binary tape is loaded by the Binary A During the first pass of the assembly, all symbols are defined and placed in the Assembler‘s symbol table. During the second pass, the binary equivalents of the input source language are generated and punched. The Assembler has an optional third pass, which produces an "assembly listing, " or a listing with the lo- cation, generated binary, and source code side by side on a line. The PDP—8 Assembly system also includes the Symbolic Tape Editor (DEC-OB-ESAB-D) For altering or editing the source language tape; the DEC Debugging Tape (DDT-8, DECvOS-CDDA-D) for debugging the object program by communicating with it in the source language, and various other utility programs such as dumps, etc. The Assembler requires a basic PDP-8 system consisting of the ASR33 Tape Reader and Punch and a 4K core memory. The Assembler can use either the High-Speed Reader, the High-Speed Punch, or both. The basic Assembler allows 590 user symbols when using the ASR33 and allows 495 user symbols when using the high speed reader. The Extended Assembler contains additional symbols For all optional devices. This symbol list is to be found in the Appendix. 2 CHAPTER ILLUSTRATIONS OF PDP-8 ASSEMBLER FEATURES THE LOCATION COUNTER In general, statements generate l2-bit binary words which are placed into consecutive memory locations when the object tape is loaded. The location counter is a register used by the PDP-8 Assembler to keep track of the next memory location available. counter may It is updated after processing each statement. be explicitly set by an element or expression preceded by an asterisk. The location The element or ex- pression following the asterisk sets the current location counter to the value of that element or expression. Subsequent instructions are assembled into subsequent locations. Example: * 31555 The next instruction would be placed in location 3%. The location counter is initially set to flZflfl. CODING ILLUSTRATIONS To illustrate some of the Features of the PDP—8 Assembler, a number of different ways. is positive, then halts. a The routine continually adds I small routine has been chosen and coded in to the contents of a location until the result The instructions used are represented as their octal codes (more compact than the binary actually used). The number being incremented is in location l7fl. The notation C(A) means the contents of location A. “W *UJI “”2 “”3 “‘54 “”5 “‘56 “7‘5 II7I2I /C(I7;2I) INTO AC 7W1 /ADD I TO AC 317g /STORE IN LOCATION 17¢ H791 /FETCH C0753) 77w! /SKIP ON POSITIVE AC, CLEAR AC 51m /JUMP TO LOCATION my: 74m /HALT y; /W|LL CONTAIN NUMBER TO BE INCREMENTED Since the location counter is automatically incremented, avoided after the first address in the progression. have been used in place of the octal codes. specifying sequential addresses could have been In addition, the names of the PDP-8 instructions could The octal representation of these instructions is substituted by the Assembler whenever symbols appear in the program. 2—I Example 2: ”W TAD 17g lAC TAD 17¢ 17g SPA CLA JMP 1ng DCA HLT *l7‘5 Id The same program could have been written using symbolic address tags. The comma after the symbol A indicates to the Assembler that the location in which it places the instruction TAD B is to be named A. Information associating the symbol A with the number of actual locations is placed in the Assembler's sym— Consequently, when processing the instruction JMP A, the Assembler finds the symbols JMP bol table. and A in the symbol table and uses these values to form the binary equivalent of the instruction JMP A. Example 3: ”W A, TAD B lAC DCA B TAD B SPA CLA JMP A HLT *l7,0' B, l3 Unless the user specifically wanted to use location l7¢ for storage, he could let the Assembler assign the location. Example 4: *IW A, TAD B lAC DCA B TAD B SPA CLA JMP A HLT B, 15 2-2 CHAPTER THE SOURCE This chapter explains the featuresofthe ASCll source 3 LANGUAGE language available to the user of PAL lll . THE CHARACTER SET Letters ABCDE...XYZ Digits 123456789¢ Punctuation Characters Since a number of characters are invisible (i .e. nonprinting), the following notation is used to represent them in the examples: L—J space tab —>| ) . carriage return The following characters are used to specify operations to be performed upon symbols or numbers: Character E? r_; space combine symbols or numbers + plus combine symbols or numbers minus combine symbols or numbers 2 carriage return terminate line —>l tab combine symbols or numbers or format the - source tape comma assign symbolic address equals define parameters asterisk set current ,- semicolon terminate coding line $ dollar sign terminate pass , = * 3—] location counter / point has value equal to current location counter slash indicates start of a comment lgnored Characters form teed end of a logical page of a source program (See Symbolic Editor DEC-08-ESAB-D) blank tape used for leader/trailer rubouts used for deleting characters code 2%? used for leader/trailer line feed follows carriage return lllegal Characters All other characters are illegal and cause the Illegal Character error printout: PASSl rent . lC dddd AT dddd during The First number is the value of the offending character, and the second is the value of the cur- location counter where it occurred. lllegal characters are ignored. ELEMENTS . . . . . Any group of letters, digits, and punctuation which represents binary values less than 2 12 , IS an element. Number Any sequence of numbers delimited by punctuation characters forms a number. Example: 1 l2 4372 The radix control pseudo-instructions indicate to the Assembler the radix to be used in number interpretation. The pseudo-instruction DECIMAL indicates that all numbers are to be interpreted as decimal until the next occurrence of the pseudo-instruction OCTAL. The pseudo-instruction OCTAL indicates that all numbers are to be interpreted as octal until the next occurrence of the pseudo-instruction DECIMAL. otherwise specified The radix is initially set to octal and remains octal unless . 3—2 Symbol Any sequence of letters and digits beginning with a letter and delimited by punctuation characters is a symbol. Although a symbol may be any length, only the first six characters are considered, and any ad— ditional characters are ignored; symbols which are identical in their first six characters are considered identical. Pseudo Instructions may not be used as symbols or tags within a program. The Assembler has in its permanent symbol table definitions of the symbols for all PDP-8 operation codes, operate commands, and many IOT commands (see the Appendix for a complete list). These may be used without prior definition by the user. Examples: is a symbol whose value of 4459“ is taken from the operation code JMS definitions. When used as a symbolic address tag, This value is is a user-created symbol. A its value is the address of the instruction it tags. assigned by the Assembler. PARAMETER ASSIGNMENTS A parameter may be assigned by use of the equal sign. The symbol to the left of the equal sign is assigned the value of the expression on the right. Examples: A=6 EXIT=RETURN=JMP l 13 Symbols defined by use of the equal sign may be used in any valid expression. Example; A=lfl¢ B=4fl¢ has the value 59¢ A+B has the value Hg,“ TAD A If the expression to the left of the equal sign has already been defined, the ReDefinition diagnostic: RD XXXXXX AT dddd Will be typed where XXXXXX is the symbol's name and dddd is the contents of the current location counter at the point of redefinition. The new value will be stored in the symbol table. 3-3 Example: 1W CLA=76¢¢ * will cause the diagnostic: RD CLA WW AT Whenever CLA is used after this point, it will have the value 76ml. SYMBOL DEFINITION by the user in one of two ways A symbol may be defined (I) by use of parameter assignment Example: DISMIS=JMP l g and (2) by use of the comma When a symbol is terminated by a comma, it is assigned a value equal to the current location counter. If it is defined more than once in this manner, the Assembler will type the duplicate tag diagnostic: DT XXXXXX AT dddd where XXXXXX is the symbol, and dddd is the current location counter at the second occurrence of the attempted symbol definition. The symbol is not redefined. Example: *35595 START, TAD A DCA COUNTER CONTIN, JMS LEAVE JMP START A, COUNTER, START, -74 fl CLA CLL The symbol ”START" would have a value of fiBflfl, the symbol "CONTlN" would have a value of $332, the symbol "A" would have a value of fl3fl4, the symbol "COUNTER" (considered by the Assembler to be COUNTE) would have a value of 3213;55, and when the Assembler processed the next line, it would type during PASSl: 3—4 S TART DT flSflé AT Since the first PASS of PAL lll is used to define all a symbols in the symbol table, the Assembler will type diagnostic if, at the end of PASSl, there are any symbols remaining undefined. For example: *71713 TAD C A, CLA CMA HLT JMP Al C,¢ $ would produce the Undefined Address diagnostic: UA XXXXXX AT dddd where XXXXXX is the symbol and dddd is the location at which it was first seen. is printed at the end of PASS] . The entire symbol table In the case of the above example, this would be: 717g A UA A1 c 7174 7173 AT If, during PASS], PAL lll detects that its symbol table is full (in other words, that there is no more memory space to store symbols and their associated values), the Symbol Table full diagnostic: ST is typed. XXXXXX dddd XXXXXX is the symbol that caused overflow, and dddd is the current location when the over— The Assembler halts and may not be restarted. flow occurred. or more AT The source program should be segmented, address arithmetic used, to reduce the number of symbols. Using ASR33; 655 symbols. defined symbols. PAL lll's symbol capacity is: The basic symbol table contains 65 symbols (see Appendix) leaving 59¢ user- Using the High-Speed Reader; 56g symbols. The basic symbol table contains 65 symbols leaving 495 user—defined symbols. EXPRESSIONS Symbols and numbers are combined with certain operators to form expressions. + - I_l There are three operators; plus this signifies 2's complement addition minus this signifies 2's complement subtraction space space is interpreted in context. Since a PDP—8 instruction has an operation code of three bits as well as an indirect bit, a page bit, and seven address bits, the Assembler must combine memory reference instructions 3-5 in a manner somewhat different from the way in which it combines operate or [CT instructions. The Assembler accomplishes this by differentiating the symbols in its permanent symbol table. The following symbols are used as memory reference instruction op codes; figflfl lflflfl ZWJfl 3flf5fl 4528535 5am AND TAD lSZ DCA JMS JMP lflflfl 2¢¢¢ 3151M 415W 5km éflflfl 7%39' 55555555 FADD FSUB FMPY FDIV FGET FPUT FNOR FEXT logical AND Two's complement ADdition Index and Skip if Zero Deposit and Clear Accumulator JuMp to Subroutine JUMP Floating ADDition Floating SUBtraction Floating MultiPlY Floating DIVide Floating GET Floating PUT Floating NORmalize Floating EXiT When the Assembler has processed one of these symbols, the space acts as an address field delimiter: MUM/I A JMP CLA A, A has the value 41m, JMP has the value 512%, and the space acts as a field delimiter. are These symbols combined as follows: A JMP 1W W1 33W 91151 W“ Wfl W3 M5 The seven address bits of A are taken, i.e.: 13W 155?“ Ml Wt The remaining bits of the address are tested to see if they are zero's (page zero reference); if they are not, the current page bit is set: 12W 1511 PW $3951 The operation code is then ORed into the expression to form: U151 55“ 95W 553?“ or, written more concisely: 53¢] 3-6 In addition to the above outlined tests, the page bits of the address field are compared with the page bits of the current location counter. If the page bits of the address field are nonzero and do not equal the page bits of the current location counter, on out-of—page reference is being attempted and the Illegal Reference diagnostic is printed on PASSZ or PASS3. For example: *4iflfl A, CLA CLL *72w' JMP A The symbol in the address field of the jump instruction has a value of4l¢¢ while the current location counter, i.e., the address where the instruction will be placed in memory, has a value of 72%]. instruction is illegal on the PDP—8 and will be flagged during PASSZ or PASS3 by the This Illegal Reference diagnostic: IR 4i¢¢ AT 72¢fl The value 53¢¢ would be assembled at location 722%. The symbol I caused the indirect bit (bit 3) to be set in a memory reference instruction: DCA l For example: 19' would produce: QM 1955?! W1 W3 or: 341g When a space occurs in an expression that does not contain a memory reference instruction op code, it means inclusive OR: For example: CLA CLL the symbol CLA has a value of 73315 and the symbol CLL has a value of 719% CLA CLL would produce 73%. User-defined symbols are treated as nonmemory reference instructions (see Pseudo-Instructions). 3-7 For example: A=333 *222 B, CLA Then the expressions and their values are shown below; Al—lB ¢555 m11 ¢333 —A 7445 A+B A—B 1-3 7557 3-1 {21221 77157 —7l etc . An expression is terminated by either a carriage—return () ) or a semicolon (;). If any information was generated to be loaded, the current location counter is incremented. Example: RAR; RTR; CMA) Produces three registers of information and the current location counter is incremented after each ex— pression . The statement: HALT=HLT CLA) produces no information to be loaded (it produces an association in the Assembler's symbol table) and hence does not increment the current location counter. *4721 TEMP, ) TEM2, g) The current location counter is not incremented after the line and TEM2 are assigned the same value, in this case 472i TEMP,) and hence the two symbols TEMP . CURRENT ADDRESS INDICATOR The single character period (.) has, at It may be used as any number or symbol all times, a value equal to the value of the current location counter. (except to the left of the equal sign). Example: *2!” J MP . +2 3—8 is equivalent to * JMP 2,62. 3% ,+24£M would produce, in register 3flfl, the quantity 27¢¢ Example: *ZZWJ CAL L=J MS 1 27 Since the second line, CALL=JMS l . does notincrement the current location counter, flfl27 would be placed in register 221313 and CALL would have the value of lflfl ilfl flflfiz or 46i5i38. The properties of the character (.) have been slightly changed; Previously, so PAL III would neither diagnose nor correctly assemble there is no space between the P and the.) that, it now acts as a terminator. expressions such as: JMP. (where PAL III now treats this (JMP.) as it it were this (JMP .) COMMENTS A comment field is indicated by the slash (/) character. The Assembler will ignore everything from the slash to the next carriage return . Example: CLA /THIS IS A COMMENT PSEUDO-INSTRUCTIONS There are several pseudo-instructions that are used to direct the Assembler. DECIMAL Set the current radix to decimal OCTAL Set the current radix to octal PAUSE These are: Stop the Assembler. The current pass is not terminated. PAUSE must be physical end of the program tape as the reader routines are buffered and the buffer is emptied when PAUSE is detected. The assembly is continued by depressing CONTINUE. Two or more tapes must be used with at the the PAUSE instruction. FIELD Causes a field setting to be punched during PASSZ. This is recognized by the Binary Loader (DEC-O8-LBAA-PM) and causes all subsequent information to be loaded into the field specified by the expression. The expression must be between fl and 7, inclusive. EXPUNGE Erase the entire symbol table except for the pseudo-instructions. FIXTAB Fix the current symbol table. printed Symbols that have been fixed are not in the symbol table at the end of PASSI 3-9 or PASS3. Fix memory reference instruction FIXMRI . This may be given only after It tells the Assembler that the following symbol definition EXPUNGE. is a memory reference instruction and is to be treated as described under Expressions . Example: EXPU NGE FIXMRI TAD=1¢¢¢ FIXMRI DCA=3M25 CLA=72¢125 FIXTAB PAUSE When this program segment is read into the Assembler during PASSl, all symbol definitions are deleted and the three symbols listed are added to the table. This process is often performed to alter the Assembler's symbol table so that it contains only those symbols that will be used . This may increase the Assembler's capacity for other user-defined symbols. Symbolic representation for indirect addressing I . Example: DCA I STORE Optional method of denoting a Page fl reference. Z Example: DCA Z ADD CHAPTER PROGRAM PREPARATION 4 AND ASSEMBLER OUTPUT The source language tape (symbolic tape) is prepared in ASCII code on 8-channel punched paper tape using an off-line Teletype or the on-line Symbolic Tape Editor (DEC-08-ESAB-D). should begin with leader code which may be blank tape, code 2%], or In general, a program rubouts. PROGRAM TAPE Since the Assembler ignores certain codes, these may be used Freely to produce a more readable symbolic source tape. These codes are tab, line-feed, and form-feed. The Assembler will also ignore extraneous spaces, tape carriage-return/Iine-feed combinations, and blank . The program body consists of statements and pseudo-instructions. sign Followed by some trailer code. instruction PAUSE. The program is terminated by the dollar It the program is large, it may be segmented by use of the pseudo- This often facilitates the editing of the source program since each section will be physically smaller. The Assembler initially setsits current location counter toflZflQ’. Thisis reset whenever the asterisk is processed. During PASSI, all illegal characters cause a diagnostic to be printed. The following two programs are identical: *ZW /EXAMPLE OF FORMAT /GENERATOR BEGIN, fl/START OF PROGRAM KCC KSF/WAIT FOR FLAG JMP.-I/FLAG NOT SET YET KRB/READ IN CHARACTER DCA CHAR TAD CHAR TAD MSPACE/IS IT A SPACE? SNA CLA HLT/YES JMP BEGIN+2 /NO: INPUT AGAIN CHAR, fl/TEMPORARY STORAGE MSPACE, -24¢/—ASC|I EQUIVALENT /END OF EXAMPLE $ The character is ignored. *ZW /EXAMPLE OF FORMAT /GENERATOR BEGIN, I5 /START OF PROGRAM KCC /WAIT FOR FLAG /FLAG NOT SET YET /READ IN CHARACTER KSF JMP.—I KRB DCA CHAR TAD CHAR TAD MSPACE /IS IT A SPACE? SNA CLA /YES HLT JMP BEG|N+2 /NO: INPUT AGAIN CHAR, MSPACE, y! -24IJ /TEMPORARY STORAGE /-ASCII EQUIVALENT /END OF EXAMPLE $ Both of These programs are identical and produce the same binary code. To read The second, however, is easier . During PASSl, the Assembler reads the source tape and defines all symbols used. If any symbols remain undefined, The UA diagnostic is is printed (or punched) at The end of PASSl printed. The symbol Table is printed in alphabetic order. . The user's symbol Table If The program listed above were assembled, The PASSl output would be: BEGIN CHAR MSPACE may} 91213 gm 4 During PASSZ, The Assembler reads The source Tape and generates The binary code using The symbol Table equivalences defined during PASSl . The binary Tape that is punched may be loaded by the Binary Loader (DEC-08— LBAA-PM). This binary Tape consists of leader code, on originsetting, and Then daTa words. Every occurrence of an asterisk experssion causes a new origin to be punched on The Tape and resets The A5- sembler's current location counter. and trailer code is generated. AT the end of PASSZ, The checksum is punched on the binary tape During PASSZ, The Assembler may diagnose an Illegal Reference. When using The ASR33 Punch, The diagnostic will be both typed and punched and will be preceded and followed by rubouts. The Binary Loader will ignore everything that has been punched on a tape between rubouts. During PASS3, The Assembler reads the source Tape and generates the code from The source statements. The assembly listing is Typed (or punched). code in octal, and the source statement. It consists of The current location counter, the generated The symbol table is Typed at the end of the pass. listed above were assembled, the PASS3 output would be: 4—2 If The program MW 9525?“ 152132 M213 152134 $52555 132136 112137 MW I32] 1 I521 2 gm 3 12121 4 WW 642532 6%31 52m am *ZW /EXAMPLE OF FORMAT /GENERATOR BEGIN, I?! /WAIT FOR FLAG /FLAG NOT SET YET /READ IN CHARACTER KSF JMP.—I KRB 321 3 DCA CHAR 121 3 TAD CHAR 1 21 4 TAD MSPACE 765g 7432 521212 WW 7545 SNA CLA HLT JMP BEGIN+2 CHAR, MSPACE, I?! -24;25 /END OF EXAMPLE BEGIN CHAR MSPACE /START OF PROGRAM KCC £32911?! I52} 3 £3214 4-3 /IS IT A SPACE? /YES /NO: INPUT AGAIN /TEMPORARY STORAGE /—ASCI| EQUIVALENT CHAPTER OPERATING 5 INSTRUCTIONS The PAL III Assembler is provided as a binary tape. This is loaded into the PD-P-8 memory by means of the Binary Loader, using either the ASR33 Reader or the High-Speed Reader (see DEC-08—LBAA—D). The Assembler will use either the ASR33 Reader or the high—speed reader to read the source language tape, and it will use either the ASR33 Punch or the High-Speed Punch for output. devices is made by the Assembler when it is started. The selection of I/O The source language tape must be in the proper reader, with the reader and punch turned on. When using the high-speed punch, the symbol table will be typed on the ASR33 if bit ll of the switch register is 0 (down); it will be punched on the high—spped punch if bit ll of the switch register is a I (up). When using the high-speed punch, the symbol table output, the telepunch should be left on, since the symbol table produced may be read by DDT (see DEC-08-CDDA-D). All diagnostics will be typed on the ASR33 (except for the undefined address diagnostic when using the high-speed punch and the bit ll switch option). PASSZ will be punched using the ASR33 The binary tape produced during punch or the High-Speed Punch if it is included in the machine configuration and turned on. The only diagnostic in PASSZ will be Illegal Reference. Since this is typed on the ASR33, it may also be punched on the binary tape. It will, however, be Binary Loader. The bit ll switch option may be used during PASS3 also. ignored by the If the machine is not equipped with a High-Speed Punch, bit II will have no effect. In addition to the binary tape of the Assembler, the user is provided with an ASCII tape containing sym- bol definitions for the instruction sets of the available options to the PDP-8 (i .e. , card readers, magnetic tapes, A/D converters). Since there is only a finite amount of space available, expanding the number of permanent symbols that the Assembler recognizes decreases the maximum number of symbols the user may have available to contain definitions for For this reason, the ASCII Extended Definitions tape should be edited . only those options which the user has acquired. the Assembler only on PASSI . This tape should be read into Since it permanently fixes the symbols it contains, it should not be read again until PAL III is reloaded. l . Load the Assembler using either the ASR33 Reader or the 2. Set JUZJZM into the switch register; press LOAD ADDRESS 3. Place the source language tape in the reader. High—Speed Reader. . Turn the reader on; turn the punch on. 4. Set Bits I? and ] of the switch register for the proper pass. Bit 121 Bit 1 y} ] PASS] ] fl PASSZ ] ] PASS3 These settings are: PASS] is required so that the Assembler can initialize its symbol table and define all user symbols. 5. After PASS] has been made, either PASSZ or PASSB may be made. Bit ]] switch option During PASS] Bit ]] = Punch symbol table on high—speed punch if it isinthe ] machine configuration. Bit ]] = 25 Type (and punch) the symbol table on the ASR33. No effect During PASS2 During PASS3 Bit ]] Punch assembly =] punch Bit ]] 6. Press START. =¢ listing tape, in ASCII, on high-speed . Type assembly listing on ASR33. The Assembler will halt at the end of each pass. Proceed from step 3. If the Assembler has halted because of a PAUSE statement, put the next tape into the reader and press CONTINUE. SUMMARY PASS] The Assembler reads the source tape, defines all user symbols, and outputs the user symbol table in alphabetic order. lC dddd AT PASS] diagnostics are: Illegal Character XXXX where dddd is the value of the illegal character and xxxx is the value of the current location counter when the character was processed. RD XXXXXX AT dddd The character is ignored. ReDefinition where XXXXXX is the symbol being redefined and dddd is the value of the current location counter at the point of redefinition. DT xxxxxx AT dddd Duplicate Tag 5—2 The symbol is redefined. An attempt is being made to redefine a symbol using the comma. XXXXXX is the symbol and dddd is the value of the current location counter. The previous value of the symbol is retained and the symbol is not redefined. ST XXXXXX AT dddd Symbol Table full where XXXXXX is the symbol causing the overflow and dddd is the value of the Current Location restarted UA Counter at the point of overflow. The Assembler halts and may not be . XXXXXX dddd AT Undefined Address where XXXXXX is the symbol that was used, but never defined, and dddd is the value of the Current Location Counter when the symbol was first processed. with the symbol table at the end of PASS] . This is typed The symbol is assigned a value equal to the highest address on the memory page where it was first used. PASSZ The Assembler reads the source tape and using the symbol table defined during PASSl, generates and punches the binary code. Binary Loader. IR dddd AT This binary tape may then be loaded by the The PASSZ diagnostic is: Illegal Reference xxxx where dddd is the address being referenced and xxxx is the value of the Current Location Counter. The illegal address is then treated as if it were on the proper mem— ory page. Example; *73g6 JMP 3217 would produce: lR 53397 AT 73¢6 and would generate 53117 to be loaded into location 73156. 5-3 PASSB The Assembler reads the source tape and, using the symbol table defined during PASSl generates and types the code represented by the source statements. tion line. Counter, the contents, and the source statement are typed side The Current Loca— by side on one If bit ll of the switch register is a l and the machine configuration includes the high-speed punch, the assembly listing will be punched in ASCII. diagnostic is Illegal Reference. 5—4 The PASS3 CHAPTER SYMBOL 6 ALTERATION TABLE PAL III contains a table of symbol definitions for the basic PDP-8 and its most common optional devices. gram . These are the symbols such as TAD, RFC or SPA, which do not have to be defined in every pro- This table is considered to be PAL III's permanent symbol table. listed under the heading BASIC SYMBOLS in Appendix I of this manual. more peripheral All the symbols it contains are If the user had purchased one or of the optional devices whose instruction set is not defined among the BASIC SYMBOLS, for example, EAE or an A/D CONVERTER, it would be desirable if he could add the necessary symbol definitions to the This would eliminate the need for him to define these symbols in every program permanent symbol table. he writes. The opposite case would be the user who needs more space for his symbols. He would like to be able to delete all definitions except the ones he will actually use in his program. For such purposes PAL III has three table. pseudo-instructions that may be used to alter its permanent symbol These pseudo-instructions are recognized by the Assembler only during PASSI PAS$2 or 3, . During either they are ignored and have no effect. The pseudo-instructions that alter the symbol table are: EXPUN GE Erase the entire permanent symbol table, except for the 9 pseudo-instructions listed in Appendix I under BASIC SYMBOLS. FIXMRI Fix Memory Reference Instructions. a This must be followed on the same line by symbol definition statement (parameter assignment) since the memory reference instructions are constructed in the symbol instructions. immediately following the pseudo- In other words the letters FIXMRI must be followed by one space, the symbol for the MRI to be defined, an equal sign, and the actual value of the symbol to the immediate left of the equal sign. The pseudo-instruction must be repeated for each MRI to be defined definition of any other symbol. EXAMPLE: EXPUNGE FIX MRI TAD = 1000 FIX MRI DCA = 3000 . All MRI's must be defined before the FIX the current symbol TABLE FIXTAB occurance . All symbols that have been defined before the of this pseudo-instruction are made part of the permanent symbol table and will not be printed in the symbol table at the end of PASSl or PASS3. An actual tape to add two symbols to those already in PAL III's permanent symbol table would have punched on it in ASCII: CDF=62¢T C IF=62¢2 FIXTAB PAUSE To use such a tape the user would: I . Read in PAL III with the Binary Loader. 2 Set 200 in the SWITCH REGISTER and press LOAD ADDRESS. 3 Set switches for PASSl 4. Put definitions tape 5 Press START . (ASCII) in the proper reader. . The PAUSE pseudo-instruction at the end of the tape indicates to the Assembler that the current PASS is not ended and 6. another tape is to follow . With switches still set to PASSl, put user's program in reader and press CONTINUE on the console . The next program to be assembled should not be preceded by the definitions since they are already in the permanent symbol table and will be there until PAL III is reloaded. After altering the symbol table to fit his needs the user might wish to keep PAL III in this state. be done by punching a binary of the section of core occupied by PAL with its new symbol table This can . To do this: i . 2. Read in PAL III and modify symbol table as desired. PAL III's symbol table table . begins at location 23508. Count all the symbols in the Since each symbol and its value require four registers, Convert this number to octal and add it to The lower limit is OOOl . 6-2 altered symbol multiply this number by 4. 23508. This number is the upper limit of PAL III 3. Using the directions for Binary Punch Routine. (Digital—8-5-U) and the limits as stated in 2 above punch out the PAL III Assembler itself. 4. The output of the Binary Punch Routine is the Assembler with the modified Symbol Table and may be loaded with the binary loader. PAL III is loaded. EXAMPLE: The following ASCII tape is read in on PASS] : CDF CIF RDF RIF 6202 6214 = = RMF RIB 6201 = = = 6224 = 6244 6234 FIXTAB PAUSE The Assembler now has in its symbol table the "MEMORY EXTENSION CONTROL" symbols and definitions. Six symbols were added and none removed . There were 84 symbols in the basic Assembler, there are now 90 symbols which require a total of 360 the symbol table starts at 2350, it extends to Routine is used to punch from + 23508 5508 or (10) 3l208 . or 550 8 locations. Since The Binary Punch 000i8 through 3l20 8 and the output is the Assembler with all the basic symbols plus memory extension symbols. APPENDIX SYMBOL 1 LISTS BASIC SYMBOLS /PSEUDO INSTRUCTIONS FIELD EXPUNGE FIXMRI PAUSE FIXTAB DECIMAL OCTAL I z /MEMORY REFERENCE INSTRUCTIONS AND WW TAD 1mg IS-Z 2mg DCA 3mg JMS 4mm JMP 5mg /FLOATING-POINT INSTRUCTIONS FEXT WW FADD Iggy! FSUB 212W FMPY 3mg FDIV 4W9! FGET 5mm FPUT 6mm FNOR 715W /PROGRAM INTERRUPT 6W1 éflm /H|GH-SPEED READER RSF 69!“ RRB 69112 6% I4 ION IOF /H|GH—SPEED PUNCH PSF PCF PPC PLS @2121 6¢22 652524 6,626 /KEYBOARD/READER KSF 6¢31 KCC 6¢32 I<RS (m4 KRB 6¢36 /TELEPRINTER/PUNCH TSF @2141 TCF 6,642 L IR: 6344 /GROUP I OPERATES NOP IAC RAL RTL RAR RTR CML CMA CLL CLA /GROUP 2 OPERATES HLT 74m OSR 74PM 646 713W 7W1 7W4 7¢¢6 7mg 7¢I2 7mg 7¢4¢ 7mg 72m /COMBINED OPERATES CIA LAs Al—l 7¢4I 76¢4 74142! 742421 7432 74421 74521 75m 751 g SKP SNL SZL SZA SNA SMA SPA STL GLK STA 712$ 72214 724g /DECTAPE DUAL TRANSPORT TYPE 555 AND CONTROL TYPE 552 MMMM 6757 MMSF 6761 MMMF 6756 MMCF 6772 MMML 6766 MMSC 6771 MMLS 6751 MMRS 6774 MMLM 6752 MMCC 6762 MMLF 6754 MMLC 6764 /DECTAPE TRANSPORT TYPE TU55 AND CONTROL TYPE Tcm DTRA 6761 DTSF 6771 DTCA 6762 DTRB 6772 DTXA 6764 DTLB 6774 /MEMORY PARITY TYPE 188 SMP 61 m CMP 61 T214 EXTENDED SYMBOLS /PDP -5 EAE SYMBOLS 153* LAR 6W1 61132 61,64 MUL 6111 RDA 6112 CAM LMQ SZO 6114 DIV 6121 RDM 6122 SAF 6124 /PDP—8 EAE SYMBOLS 182 7M5 7427 ASR 7415 DVI LSR 7417 NMI 7411 MQL 7421 SHL 7413 SCA 7441 MQA 75W CAM 7621 MUY /MEMORY EXTENSION CONTROL TYPE 183 62,01 6222 RIF 6224 CIF RMF 6244 RDF 6214 RIB 6234 CDF /AUTO RESTART TYPE KR¢1 SPL * = 6122 PDP—5 EAE symbol definitions do not appear on the actual tape due to a conflict in the CAM instructions of PDP—5 and PDP-8. PDP-8 EAE symbols should be deleted if those for PDP-5 are inserted in the extended symbols tape. A1 —2 /AD CONVERTER TYPE 189 ADC 6fl¢4 /AD CONVERTER/MULTIPLEXER T38E/T 39E ADSF 653T ADCC ADCV 6532 ADSC 65 42 ADRB 6534 ADIC 65 44 DYL DYS 6¢63 6fl54 6¢64 6fl67 DCF 6572 654] /OSCILLOSCOPE DISPLAY TYPE 34D DCX DXL DC Y DXS 6155] 6¢53 6¢61 62557 , DIX DIY /SCOPE TYPE 3ON DLB 612574 /LIGHT PEN TYPE 37¢ DSF 61671 /PLOTTER AND CONTROL TYPE 35EB 65m 65¢4 PLCF 65m PLPU PLPR 65]] PLPU 6512 PLDD 6514 PLPL 6521 PLUD 6522 PLPD 6524 PLSF /CARD READER AND CONTROL TYPE CRWC RCSF 663] RCSP 667 T RCRA 6632 RCSE 667] RCRB 6634 RCRD 6674 /CARD READER TYPE 451 CRSF 6632 CERS 6634 CRRB 667T CRSA 6672 CRSB 6674 CPSE 6642 /also services card punch 450 /CARD PUNCH AND CONTROL TYPE 45¢ CPSF CPCF 663T 664] CPLB 6644 /CERS as appears under card reader 451 /LINE PRINTER TYPE 645 ,LCF 6652 LPR 6655 LSF 6661 LCB 6662 LLB 6664 AT—3 1v13as/ wn30 393 CINV [93 3330 9399 NDEIG 9399 3330 [[99 :EIHCI 3199 9130 9l99 EISHCI 1399 3930 3399 NDEICI V399 3113N9vw/ 33w EldAl V19 1319 9319 CDW 3319 SLVV 3nsw 1119 3Nw 3M9 31W 9119 amsw 1319 :IMGW 3319 3AA3vv 3319 :IAAHW 3319 :IN\IW 3319 :IEISW 1819 330vv 3919 CIEDW 3219 JHHVV 3819 :EIIW 3919 s31vv ve19 33W [V19 3M3w 31219 VDHW vv19 v3w 91719 339w 3113Novw/ 3cm EldAJ. 389 (188]. 9119 W:|IJ_ 1319 EMS]. [[9 9 :ICISJ. 1319 HSSJ. ZZZ9 1.831 7319 lHMl [€19 1ch]. 3819 SEISJ. 17819 lHOIEl/ 'IEINNVHZ) 31dW‘v’S GNV CI'IOH 1031No3 EldAJ. VL33V NOIldO/ OJ. Sid/Kl 3681 EIOXEHdIl'IflW DSH [£99 DVH 3199 DVS 17199 VLVG/ NOIlVDINnWWOD SWELLSAS EldAJ. 389 TELL]. W9 17 d>lS.|.J_ [3’79 on [3179 33179 173179 NOXll 3379 1311 1179 :iOXll 173179 1311 31v9 33mm 111
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies