Digital PDFs
Documents
Guest
Register
Log In
DIGITAL-7-12-I
January 1965
8 pages
Original
0.3MB
view
download
Document:
FFloader
Order Number:
DIGITAL-7-12-I
Revision:
Pages:
8
Original Filename:
http://bitsavers.org/pdf/dec/pdp7/DIGITAL-7-12-I_FunnyFormat_Loader_Jan65.pdf
OCR Text
1• IDENTIFICATION 1•1 Digital-7-12-1 1 .2 F. F. Loader 1 .3 January 7, 1965 PDP '7 LIBRARY Digital-7-12-1 Page 2 2. ABSTRACT The F. F. Loader will load a binary object tape produced by the PDP-7 Assembly System and will normally be punched by the assembly system at the beginning of such a tape. During read-in, a computed checksum will be compared against a checksum read from tape. The loader will halt if the checksums differ, displaying (in the AC) a word in which zeros indicate incorrect bits. When read-in is completed, the loader will execute the instructions which were punched in the start block on the object tape. The address following the last constant stored by the loader {normally the first free location in memory} will be in the AC at th is time. 3. REQUIREMENTS 3. 1 Memory Locations 17600-17755 {4ki 7600-7755} 3.2 Subprograms Read-In Mode Loader {Digital-7-12-1} 4. USAGE All I ibrary programs are written for an 8K machine. However r the program Iibrary is completely compatible with machines having larger and smaller memories. That is, any PDP-4 may be operated as an 8K machine {remembering only that programs stored in the upper half of an 8K memory will actually be stored in locations 10000 lower in a 4K machine}. 8 Consequently, switch settings and memory addresses are specified for an 8K machine. . A binary tape of the F. F. Loader (suppl ied separately or preceding an object program) can be loaded by the Read-In Mode Loader (RIM) by placing the tape in the reader and depressing the START key with 17770 in the ADS (if RIM loader is not in memory r load RIM tape by depressing READ-IN switch on console). The F. F. Loader starting address is 17600. The loader assumes an RSB instruction has been given to the tape reader before entry at 17600 0 To start the loader after positioning the tape before the start block, an RSB must be placed in 17577 and the loader started there. When the loader is punched on an object tape by the Assembler, a jump to 17600 is automatically executed after the loader is placed in memory. The remainder of the object tape will be loaded automatically. If the loader is not punched on the object tape, a JMP 17600 replaces it, causing the RIM loader to transfer control directly to the F. F. Loader {which must be in memory, see above}. PDP 7 LIBRARY Dig i ta 1-7 - 12-1 Page 3 If START followed by an address was used to terminate the source program! the F. F. Loader will transfer control to that address immediately after the tape is loaded. If PAUSE was used followed by an address, depressing CONTINUE will cause the control transfer. If either START or PAUSE are used with no ensuing address, the computer will halt after loading the program. To execute the program, the user will have to place the starting address in the address switches and depress START. In all cases, the AC will contain the location following the last constant stored. 6. DESCRIPTION A tape in the format produced by the PDP-7 Assembler, Digital-7-3-S, (as described in the Assembler Output chapter) can be loaded by the F. F. Loader. The data block body contains the information to be loaded in F. F. binary. Interpretation of this information is determined by the loader codes discussed below. Where to load the data generated, when to cease loading, and where to transfer machine control is determined by the data block heading, the termination block, and the start block, respectively (see Digital-7-3-S). This information to the loader is punched in normal binary format. F. F. Binary F. F. Binary code is read in alphanumeric mode; that is, all eight bits on each Iine are taken as data. Each three I ines of tape supply 24 bits of information to the loader. Of these, 18 form a data word and the remaining 6 instruct the loader how to handle the data word. To enable the loader to detect the end of a block of data, the number of words in each block is complemented and punched in the block heading. It is then indexed each time a word is read. Reading continues unti I this count is O. Thus, if the block consists of n words, 3n lines of tape will be read, eight bits per line, to obtain the data. A word (three TInes) of r:--F. Binary may be interpreted directly from the tape by the user if desired. Hold the tape with three holes to the right of the feed holes and five on the left. Reading as the loader does, from title to termination block, the first line is the eight least significant bits in the data word, the rightmost bit being bit 17. The second line is the next eight bits in the data word with bit 9 on the right. The third line from left to right contains two code bits not used by the F. F. Loader, followed by the four code bits which tell the F. F. Loader how to handle the data word. The rightmost two bits are bits 0 and 1 of the data word. The data words in any block are loaded into memory from the highest location loaded by that block downward. The block heading contains the highest location loaded as the address of a DAC instruction. Th is address is decremented by one whenever a data word is loaded into memory. It will always indicate the next location to be loaded by the F. F. Loader. It is referred to as the current address indicator (CAl) in the code descriptions. PDP '7 !lIBRARY Digital-7-12-1 Page 4 The F. F. Loader handl ing codes (four bits) and the ir meanings are: Code o Meaning Storage word. Deposit the word in the address indicated by the CAl and decrement the CAl by one. . Storage word with undefined symbol address. The address part of the word is the location of a register which now contains the value of the symbolic address which was undefined at assembly time (see code 3). Add the contents of the register address to the instruction part of the word to obtain the storage word. The storage word is then treated as in code O. 2 Reference to an undefined symbol. An undefined symbol occurred in an arithmetic operation. The word is the temporary location which contains the value of the undefined symbol (see code 3). The values of undefined symbols obtained from their temporary locations are combined until a word with code 0, 1, or 5 is encountered. The symbol value is added if bit 0 of the data word is 0, subtracted if bit 0 is 1. The accumulated undefined symbol values form the storage word processed when codes 0, 1, or 5 are encountered. 3 Definition word. The data is a DAC instruction whose address is the temporary location assigned to store the definition of a previousl·y undefined symbol which was defined at this point in the program. Deposit the contents of the CAl, plus one, into the addressed register. If the symbol was not defined equal to the value just deposited (e.g., a comma definition was not used), a word of type 4 will follow to correct the definition. 4 Undefined symbol's value. This word replaces the value defined in code 3 above • Deposit .the value in the register indicated by the preceding code 3 word. 5 Constant. Search the constants' table for the constant. Insert the word at the end of the table if it is not encountered. Then add the address of the register in which the constant is stored to the next storage word (the word which used the Iiteral as an address). 6 First three characters of a symbol. 7 Second three characters of a symbol. 10 Value of a symbol. 11-17 Unused. Words with code 6,7, and 10 are ignored during normal loading of a program • .However, these words may be read by DDT-7 or the Assembler when punched in their respective formats (see PDP-7Assembler, Digital-7-3-S) •. PDP '7 LIBRARY Digital-7-12-1 Page 5 As statements which have undefined symbol addresses are encountered by the Assembler, they generate code 1 words on the object tape. To avoid loading temporary symbol storage over another program or segment in memory, these registers are allocated sequentially beginning with the last address assignment {or 22 if no address assignment has occurred}. The only difficulty which may be encountered occurs when the number of unique undefined symbols used since the last address assignment exceeds the number of locations since the last address assignment {or since location 22, if no assignment has been made}, resulting in erroneous loading. In normal use, such an event will not occur, but the user should be aware of the possibil ity. Operating Characteristics When the Assembler punches a data block of an object tape, it calculates a checksum (the sum of all words in the block excluding the checksum) and punches it in the heading. The F. F. Loader recalculates this sum on loading and compares it to the sum punched in the heading. If the two differ after loading a block of data, the computer will halt with a number in the AC whose 0 bits indicate where the computed checksum differs from the punched value. If repeated loadings will cause the same difference to appear in the AC lights, the obiect tape is probably faulty and should be reassembled. If the difference varies, the computer or reader may be causing the difficulty. Depressing CONTINUE will cause the loader to ignore the checksum; however, the recommended action is to reload the tape. During the loading process memory locations 7 and 10 are used for storage. Consequently these locations must not be used in the assembled program. When loading is completed, location 7 contains the first free address following the constants' storage area. 8. TAPE FORMAT FlO DEC symbolic, ASCII symbolic 9. EXECUTION TIME n.a. PDP 7 LIBRARY Di9 i to 1-7- 12-1 Page 6 10. PROGRAM 10.4 Program listing ASCII F.P.LOADER TEM1::; 17777 CONEND= 7 1-11-65 RIB:: 17762 INDEX:: 10 TEM2~ RIB CKS =a 17775 WORD=' 10 /READ START BLOCK 17600/ /READ 2 WORDS TO OBTAIN INSTR OEN BY PAUSE JMS RlB DAC DONE I lOR START JMSRlB DAC DONE 2 JMS RIB /READ ADDRESS WHEN START OR PAUSE ENCOUNTERED DAC CONEND /CONSTANTS AREA SETUP DAC CONBEG ISZ CONEND /READY FOR FIRST CONSTANT /READ DATA BWCK HEADING BWCK, 3MS RIB /READ STARTIN G ADDRESS DAC CAl /PLACE IN CURRENT ADDRESS INDICATOR SPA /SKIP IF NEG, IE SKIP (TERMIN BroCK) JMP DONE /END OF LOADIN G JMS RlB /READ WORD COUNT FOR THIS BLOCK DAC TEMI ADD CAI DAC CKS /CHECKSUM JMS RIA /READ CHECKSUM DZM WORD /CLEAR ACCUMULATED WORD CaNT, ISZ TEM"I /FINISHED WADING THIS BWCK? JMP CONTI ;No LAC CKS !yES-CHECK CHECKSUM CMA SZA HLT /CHECK SUM ERROR RSB JMP BLOCK /CONTINUE /BREAK DOWN A F.F .BINARY WORD CONTI, JMS RIA /READ FIRST LINE OF A F.P.BINARY WORD DAC TD12 JMS RIA /READ SECOND LINE OF A F.F.BINARY WORD RTL RTL RTL RTL ADDTEM2 DAC TD12 /DATA WORD, BITS 2-17 FUNNY, PDP 7 LIBRARY Digital-7-12-1 Page 7 JMS RlA /READ THIRD LINE OF A F.F .BINARY WORD RTR ADD CDSP DAC RIA. /SET UP DISPATCH FOR WORD TYPE AND CCMA RAR /FORM WHOLE DATA WORD ADDTEM2 /DISPATCH TO (DSP+WADER CODE) WITH DATA WORD XCT I RIA /IN AC /GET NEXT F.F .BINARY WORD 3MP CONT /DISPATCH TABLE FOR MAGIC CODES DSPTCH, JMP CODEO /STORAGE WORD JMP CODEI /WORD WHOSE ADDRESS POINTS TO AN UNDEFINED JMP CODE2 / ADDED OR SUBTRACTED VAlliE JMP CODE3 /ADDRESS FOR AN UNDEFINED XCT CODE4 /VALUE FOR AN UNDEFINED JMP CONST /CONSTANT, CODE5 NOP /FIRST SYM WORD, CODE6 NOP /SECOND SYM WORD, CODE7 NOP /SYM CODEI0 /START WADED PROGRAM DONE, LAC CONEND /PLACE FIRST FREE ADDRESS IN AC XX /TRANSFER CONTROL OR HALT XX /STORAGE WORD, UNDEFINED ADDRESS CODE1, AND IMSK /MASK UNDEF. ADDRESS POmTER ADD I TEM2 /ADD VALUE OF UNDEF. ADDRESS AS A DAC /STORAGE WORD CODEO, ADD WORD /ACCUMULATED UNDEF. SYMB, VAWES CAl, XX /CURRENT ADDRESS INDICATOR CW /-1, TWO'S COMP. TAD CAl /DECREMENT ADDRESS POINTER DAC CAl JMP CONT-l /GET NEXT F.F.BINARY WORD /FOR-UNDEFINED SYMBOL CODE2, CLAVSPA /ADD IF BITO=O . CCMA, CMA /SUBTRACT IF BIT 0=1 XOR I TEM2 /IF BIT WAS 0, SAME AS TEM2, IF BIT 0 /WAS 1, CMA ""T!M2 ADD WORD /ADD VAIIJE TO WORD CODE2A, DAC WORD " JMP CONT /GET NEXT F.F .BINARY WORD /POINTER TO WHERE AN . UNDEFINED WILL BE STORED ° PDP '7 LIBRARY Dig ita 1-7- 12-1 Page 8 CODE3, CODE4, DAC CODE4 /SAVE DATA WORD, TEMP, roCATION FOR UNDEFINED LAC CAl TAD CCMA /ADD 1 TO CURRENT ADDRESS INDICATOR XX /PUT CURRENT ADDRESS INDICATOR INTO TEMP. LOCATION JMP CONT /GET NEXT F.F .BINARY WORD /READ 1 ALPHA WORD RIA, 0 RSF JMP .-1 Rim RSA DAC TEM ADDCKS DAC CKS LACTEM /ACCUMULATE CHECK SUM CLL JMP I RlA /SOME CONSTANT STORAGE CDSP, DSPTCH IMSK, 760000 TEM, 0 CONBEG, 0 /SEARCH AND STORE A CONSTANT, CODE5 CONST, ADD WORD /AnD ANY UNDEF. SYMBOL VAWES TO CONSTANT AND DAC I CONEND /DEPOSIT nI END OF CONSTANT TABLE LAC CONBEG /DEPOSIT BEGINNING ADDRESS OF TABLE IN INDEX DAC INDEX /LOAD CURRENT CONSTANT VAlliE lAC I CONEND CONI, /COMPARE TO CONSTANTS IN TABLE PREVIOUSLY SAD I INDEX JMPFIND SAD I INDEX /C (INDEX) IS AUTOMATICALLY INCREMENTED JMP FIND /BEFORE EACH TEST SAn I INDEX JMP FIND FIND, SAD I INDEX JMP FIND SAD I INDEX JMP FIND JMP CONl LAC INDEX SAD CONEND ISZ CONEND JMP CODE2A /IF NEW CONSTANT, INCREMENT POINTER TO END lop CONSTANT TABLE /JUMP TO CODE 2A, PLACE VAlliE OF CONSTANT IN WOR PAUSE PDP 7 LIBRARY
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies