Digital PDFs
Documents
Guest
Register
Log In
DEC-12-511B-D
August 1969
28 pages
Original
1.9MB
view
download
Document:
LINC-8 Simulator Trap Processor
Order Number:
DEC-12-511B-D
Revision:
0
Pages:
28
Original Filename:
http://bitsavers.org/pdf/dec/pdp12/diagnostics_set2/DEC-12_SI1B-D.pdf
OCR Text
-c PDP-12 LIBRARY LINC-8 SIMULATOR TRAP PROCESSOR Order DEC-12-SllB-D from Program Library, Digital Equipment Corporation, Maynard, Massachusetts 01754 Price $1.00 Direct comments concerning this document to: Software Information Service Digital Equipment Corporation Maynard, Massachusetts 01754 . ' C'. i I c CONTENTS Page (: l. Abstract 2. Equipment and Storage Requirements 2. l Equipment 1 2.2 Storage 2 3. Loading, Starting and Restarting 2 3.1 Loading Procedure 2 3.2 Normal Starting Procedure (Start 400) 2 3.3 Starting Procedure for Immediate GUIDE or LAP6-3L Loading and Starting (Start 20) 3 3.4 The Instruction Trap Enable Flip-Flop 3 3.5 Norma I Restart (Start 400) 3 3.6 "User 20" Restart (Start 20) 4 3.7 GUIDE Load Restart (Start 700-717) 4 4. Program Operation 4 4.1 Illegal Teletype Characters 5 4.2 Undefined Instruction Error Stop 5 5. Internal Operation 5 5. l Overview 5 5.2 Console Starts and Restarts 6 5.3 Operation of the Instruction Trap Hardware 6 5.4 Machine State Saving 7 5.5 Instruction Identification 7 5.6 TYP Processing 7 5.7 KBD Processing 7 5.8 Return To User Program 8 6. LINC-8 Simulator Trap Processor Adoptions 8 6. l Adaption To Process Additional LINC-8 OPR's 8 6.2 Example: Operating the XY12 Plotter Control with LINC or LINC-8 OPR's 9 6.3 Adaption for Convenient Trap Processor Loading from GUIDE or LAP6-3 L Tapes 11 6.4 Adaption for Convenient Loading With a User Program From a DIAL Tape 12 iii 0 CONTENTS (Cont) 6.5 Adaption for Loading of Programs Other Than GUIDE and LAP6-3L By The Trap Processor 12 6.6 Adaption to Suppress Teletype Character Echoing 13 7. Assembly Listing If"-, 1'·, I '--·/ iv 0 1. ABSTRACT The LINC-8 Simulator Trap Processor handles Teletype input and output for LINC-8 and classic LINC programs when they ore run on the PDP-12. It must be loaded into the PDP-12 core memory with any LINC-8 or classic LINC program which uses the keyboard, or any classic LINC program which uses the Teleprinter, in order for that program to run on the PDP-12. The trap processor operates by using the PDP-12 Instruction Trap Facility to detect execution of either of the two LINC-8 Teletype input/output instructions by the user's program. It responds to user's execution of o Teletype instruction by executing coding to simulate the instruction's LINC-8 or classic LINC effect. After simulation of the instruction, the trap processor returns control to the user program. Users may easily adapt the LINC-8 Simulator Trap Processor to their own purposes. Explicit instructions for o number of useful adoptions are provided in this document, along with enough information on the internal operation of the program to permit users to easily implement adoptions of their own invention. In this connection, attention is directed to the Dispatch Table Trap Processor, DEC-12-SI2A. It is a more suitable starting point for building extended trap processors which process a large number of different trapped instructions than is the LINC-8 Simulator Trap Processor. An important limitation of the trap processor i> that it is not interruptible. It may not be operated when the PDP-12 Program Interrupt is enabled. This document applies to the machine readable program version bearing software product code DEC-12-Sll B-UA. 2. EQUIPMENT AND STORAGE REQUIREMENTS 2. l Equipment The LINC-8 Simulator Trap Processor is at present distributed in LINCtape form only, and therefore requires o PDP-12 with LINCtape control and at least one TU55 DECtope/LINCtape transi:-ort for program loading. The program itself will run on a minimum PDP-12. The program operates correctly both in 4K PDP-12's and in PDP-12's having any amount of extended memory up to the 32K maximum total. Instruction traps originating in extended memory will be processed no differently than the same instruction traps originating in basic memory. 0 \ 0 2.2 Storage The program occupies most of the locations below 462, plus locations 700 to 717, all in PDP-12 memory segment 0. 3. LOADING, STARTING AND RESTARTING 3. 1 Loading Procedure The program is distributed on a DIAL tape. Load and start that copy of DIAL, and type into DIAL, iu1 U'iSJM,1/1) (The symbol i means Teletype LINE FEED. ) means CARRIAGE RETURN.) The LINC-8 Simulator Trap Processor will be loaded from the DIAL tape into the PDP-12 core memory, and the computer will halt. 3.2 .,-, Normal Starting Procedure (Start 400) Press 1/0 Preset, and then Start 400. The program will turn on the Instruction Trap Enable Flip-Flop \l_,.; and halt with the Instruction Field set to 2 and the Data Field set to 3. Verify that the Instruction Trap Enable Flip-Flop is on by observing the console TRAP indicator. This indicator should be lit. If it is not, some kind of error has occurred. The error may be either a machine error or an operator error. Reload the trap processor and try again. Now read in the user program. If the program is located on some specific block(s) of a LINCtape, mount the tape on either transport and execute an appropriate tape instruction from the console as if the machine were a LINC or a LINC-8. If the user program is a named file on a LAP6-3L or GUIDE tape, mount the tape on unit 0, set the LOCAL-OFF-REMOTE switch to REMOTE and press CONT. GUIDE or LAP6-3L *will be loaded, and the user program may be recalled using the usual GUIDE or LAP6 program loading procedure. If the user program is on paper tape, read it in and start it using the usual paper tape loading and starting procedures, as described in the Binary Loader operating instructions, DEC-08-LBAA-D. *LINC-8 and LINC users will recall that the GUIDE program starting procedure may be used with : either GUIDE or LAP6-3L. 2 0 Switch the processor mode to the PDP-8 mode by executing the PDP instruction (octal :0002) before using the Binary Loader. Mode changing through use of I/O Preset in conjunction with the console Mode key should be avoided because I/O Preset clears the Instruction Trap Enable Flip-Flop. 3. 3 Starting Procedure for Immediate GUIDE or LAP6-3L Loading and Starting (Start 20) To automatically load and start a LJNC-8 GUIDE or LAP6-3L tape along with the trap processor, load the trap processor from the DIAL tape as directed above, and !hen press I/O Preset, Start 20, rather than 1/0 Preset, Start 400. A GUIDE or LAP6-3L system will be read in from unit 0 and started. This procedure duplicates the "Start 400" procedure given above, with the exception that the computer , doe~ not halt between the trap processor initialization and the loading and starting of the GUIDE or LAP6-3L system. 3.4 The Instruction Trap Enable Flip-Flop Once a user program has been read in and started, the machine behaves like a LINC-8 or classic LINC with respect to Teletype input and output thereafter, but only if the Instruction Trap Enable Flip-Flop has been set. The PDP-12 Instruction Trap Enable Flip-Flop must be set in order for the trap processor to work. The state of this flip-flop is indicated by the TRAP light on the computer console. If the trap processor is loaded exactly as directed above, and if the user program is operated exactly as its instructions direct, the Trap Enable Flip-Flop will never be cleared, and will cause no problems. However, in practice it is sometimes cleared (by the operator pressing I/O PRESET for example), so some convenient methods for resetting it are included in the trap processor program in the form of the following restart procedures. 3.5 Normal Restart (Start 400) If the Instruction Trap Enable Flip-Flop has been cleared, it may be set again (providing the trap processor has been loaded into core as directed above) by starting at location 400 in memory segment 0 (absolute address 00400). Note that the START 400 key may not be used for this unless the Instruction Field (IF) is set to 0 because START 400 takes the high order 5 bits of the starting address from the IF. Set 0400 into the Left Switches and use START LS, rather than Start 400. Use of this entry point seh the Trap Enable Flip-Flop and halts the computer. (Setting of the Trap Enable Flip-Flop may be confirmed by observing the console TRAP indicator.) Pressing continue after the computer has halted causes a transfer to location 400 in memory segment 2 (ab~olute address 04400), with the Data Field set to 3. 3 0 , 3. 6 "User 20" Restart (Start 20) Starting at location 20 in memory segment 0 (00020) sets the Trap Enable Flip-Flop and immediately transfers control to location 20 in memory bank 2 (absolute address 04020), with the Data Field set to 3. Note that the START 20 key may not be used for this unless the Instruction Field (IF) is set to 0 because START 20 takes the high order 5 bits of the 15 bit starting address from the IF. Set 0020 in the left Switches and use Start LS, rather than using START 20. 3. 7 GUIDE Load Restart (Start 700-717) A third alternative is to start at any location between 700 and 717 in field 0. Use of any of these e~try points sets the Trap Enable Flip-Flop and then loa'ds and starts the LINC GUIDE or LAP6 system (if an appropriate tape is mounted on transport 0 and the LOCAL-OFF-REMOTE switch is set to REMOTE). 4. PROGRAM OPERATION Once the LINC-8 or classic LINC user program and the LINC-8 Simulator Trap Processor have both been loaded into PDP-12 memory, the operating instructions for the user program apply, and the user program will behave as it would on a LINC-8 or classic LINC, and no special account need be taken 0 of the fact that a PDP-12 rather than a LI NC-8 or classic LI NC is being used. There are a couple of minor exceptions to this. The PDP-12 console operates slightly differently from the LI NC-8 console and the classic LINC console. Also, the characters which in the LINC are obtained by striking the CASE key and then some other key such as . ,= andE3are obtained in the PDP-12 by striking a single Teletype key. The Teletype keys which are used to obtain the various LINC codes are indicated in the following diagram of the Teletype keyboard. 0 Q CD ~ CD CD CD G) Q Q 0 0 ® @QQG)QG)QG)G)QG)@@ 8QQG)QQQQCDQ0@88 8Q e> 0 Q G) wwoo oe I I SPACE Figure 1. location of LINC keys on the Teletype keyboard 4 0 An additional exception to strict classic LINC compatibility concerns "echoing" of keyboard characters. Characters typed into a user program running with the trap processor are automatically printed on the Teleprinter by the trap processor. Instructions for suppressing this feature are given in Section 6.6, Adaption to Suppress Teletype Character Echoing. 4. 1 Illegal Teletype Characters Some teletype keys, such as the semi-colon key, are not used for any LINC characters, either standard or special. These keys should not be struck when the trap processor is being used to run LINC or LINC-8 programs. up arrow, "t". If one of these illegal keys is struck, it is printed on the Teletype preceded by an Control is not returned to the user's LINC-8 or classic LINC program until a legal character is struck. The following Teletype keyboard characters are illegal: ! ' II, TAB, (, ) *, ? , f 4. 2 ] , t, ;, <, >. Undefined Instruction Error Stop The trap processor halts al location 130 in memory segment 0 when any instruction other than a Teletype ( input or output instruction is given. The trapped instruction is contained in the accumulator, and the address of the instruction is in location 134 of memory segment 0. 5. INTERNAL OPERATION 5. l Overview Teletype input·-output in LINC and UNC-8 program5 involves only three instruction>: Keyboard (mnemonic KBD; instruction code 515), Type Out (mnemonic TYP; instruction code 514) and Key Struck (mnemonic KST; instruction code 415). These are the only Lll'~C-8 instructions whose operation involve> the LINC-B Simulator Trap Processor. The proces'.;ing performed by the LINC-8 Simulator Trap Proces>or for tlie KBD and TYP imtructiom consist<. of detection of their execution by the user program, and execution of programming to reproduce in detail their LINC-8 or classic LINC effect. The KST instruction is a skip instruction which skips when the Teletype keyboard flag is set. This flag is set by the hardware when the operator strikes a Teletype key. The trap processor clears it when there is no keyboard character available for the user program to read in. 5 0 Processing for the trapped instructions KBD and TYP consists of three steps. Processing is initiated by the occurrence of an instruction trap. The first step consists of the identification of the instruction causing the trap. The second step is the execution of programming to simulate the LINC-8 effect of the particular trapped instruction. The final step is the return of control to the user program. Jn addition to the "trap processor proper", which performs as described above, the program as distributed contains small amounts of code to implement the various console restarts described above. 5.2 Console Starts and Restarts The program is initially loaded into memory segment 2, and relocates itself into segment 0 as soon as it is started. This technique is used because it leads to a particularly simple procedure for loading the program directly from LJNCtape using the console functions. See Section 6.3, Adaption for Convenient Loading of the Trap Processor from GUIDE and LAP6-3L Tapes, for a description of this procedure. If the routine had to be loaded into segment 0 directly, the console procedure for loading it would be more complicated than it is because the operator would have to set one of the 5-bit Field Registers to 0 before execution of the tape read instruction in order to load data into segment 0. As is, the user may initially load the program into any memory segment for which memory is physically present. Both the "Start 20" and "Start 400" program starting procedures execute the trap processor relocator 0 routine at symbolic location SETUP. This routine relocates the trap processor from the current instruction field into memory segment 0. Notice that the relocator routine is not itself relocated, since it is u5ed only once. After the trap processor has been relocated, the locations 700 through 717 are filled I With "JMP GUIDE". This operation provides for restarting of the GUIDE system using the Start Left S~itches function when any tape instruction is set into the Left Switches. 5.3 Operation of the Instruction Trap Hardware The trap processor operates with the Instruction Trap facility enabled, so execution of any trappable instruction (except tape instructions) by the user's program causes a transfer of control to location 141 in memory segment 0 (absolute address 00141). Also, the low order 12 bits of the address of the instruction following the trap instruction is stored in location 140, and the contents of the Instruction Field and Data Field when the trap occurred is stored in the Save Field Register. 6 0 ( -,,... 5.4 Machine State Saving The instructions between 140 and symbolic location FETCH saves regi>teVi and indicators whose contents wi II be affected by the operation of the trap processor. They wi II be restored before control is returned to the user program. Notice that the Overflow flip-flop and memory location 0 are both saved. They are both affected by the operations in the trap processor. 5. 5 Instruction Identification The code from ~ymbolic location FETCH to 0Pl4 obtains the instruction cau>ing the trap and transfers control to the subroutine which performs the LINC-8 function of the particular instruction. 5.6 TYP Processing TYP and TYP I (OPR14 and OPR I 14) are processed identically, by the subroutine beginning at OPI14. Note that exit from the subroutine does not occur until the Teleprinter has completely finished printing the character. This assures that the printer will be ready to accept a new character the next time the subroutine is entered. 5.7 KBD Processing The routine begins at tag OPlS and ends just before tag INIT. It has three functions. The functions are interrelated and are not performed in any simple sequence by the routine. Consequently, the following discussions of them do not reference specific pieces of code within the routine. The first function performed is the translation of ASCII character code characters into LINC character code characters. (Part of the definition of the LINC KBD instruction is that characters which are read in by the instruction have the LINC character code.) This translation sometimes requires that two characters be passed to the user program when only one Teletype character has been typed. Some LINC "special" characters (?, =-, u,,,., , [, _, :) did not have their own keys, and existed only by virtue of the convention that the "CASE" character followed by some other character was to be interpreted as a "special" character. The Teletype keyboard has a "SHIFT" foci lity whereby a single key may generate more than one character code, and, because of its ease of use, this "SHIFT" technique rather than the "CASE key" technique is used in the PDP-12 (and also the LINC-8) to generate the "special" characters. But since LINC programs "expect" to have special characters entered as two characters, and in general have no provision for accepting them in any other way, the trap processor must generate the appropriate pair of characters in response to the use of a single Teletype key. c 7 0 The second function of this routine is the interpretation of the I bit. This bit, when raised, means, "Don't execute the next instruction until a character from the keyboard has been acquired. If no character has been typed, pause unti I the user types one. " The final function of the routine is the clearing of the keyboard flag. This is the flag which is sensed by the LINC KST instruction. Note that when two LINC characters are generated in response to one Teletype character, the flag is not cleared unti I after the second LINC character has been generated. This assures that the user program will "think" that the operator has struck the second character, and wi 11 execute the KBD i nstructi o.n which col Iects that second character. 5. 8 Return to User Program The routine to return control to the user program begins at symbolic location RET and ends at OVN. The routine is entirely straightforWard. It simply restores the various registers in the machine to their values prior to entry to the trap processor. Note that when the KBD instruction has been given the AC w.ill get filled with some character code rather than with its contents at the time of trap processor entry. 6. L!NC-8 SIMULATOR TRAP PROCESSOR ADAPTIONS I 6 '' I1 Adaption to Process Additional LINC-8 OPR's I LlNC-8 and classic LINC installations often use instructions of the LINC OPR group for purposes other than control of the Teletype. For example, an installation may use OPR's 5, 6, 7, 10, 11and12 for controlling pen motion on an incremental plotter. Each OPR causes the pen to move one increment in one of six directions. In this section, we indicate how the LINC-8 Simulator Trap Processor may be "custom tailored" to process additional OPR's or other trapped instructions. Jn general, such modifications involve three steps: a. extension of the trapped instruction identification routine to recognize trapped instructiom other than the Teletype OPR's b. addition of a routine to simulate the effect of the LINC-8 or LINC OPR instruction; and c. return of control to the user program. The extension to the trap identification routine consists simply of adding instructions to transfer control to a subroutine when one of the new OPR's is recognized. The new instructions should be added at 8 j I c: symbolic location OTHERS, and care should be taken to preserve the error stop which occurs when the trapped instruction is not recognized. A routine which is entered when the new OPR's are given must be added to the program. The details of this routine are entirely dependent on the character of the new OPR. Finally, the user program must be re-entered. This is accomplished by transferring control to symbolic location RET. 6.2 Existing coding attends to the detai Is of restarting the user program. Example: Operating the XY12 Plotter Control with LINC or LJNC-8 OPR's Suppose that a LINC-8 or LINC user is operating an incremental plotter with 6 OPR instructions which work as follows: OPR OPR OPR OPR OPR OPR 5 (0505) 6 (0506) 7 (0507) 10 (0510) 11 (0511) 12(0512) - lower pen - raise pen - move drum up 1 unit - move drum down l unit - move pen right 1 unit - move pen left l unit Suppose further that each OPR "pauses" until the completion of the plotter operation caused by its execution. That is, execution of an OPR is not completed, and execution of the following instruction does not begin until the plotter operation caused by the OPR is completed. This "paused" mode of operation obtains whether or not the instruction's I bit is set. The XY12 plotter control used the following PDP-8 mode commands: PLSF PLCF PLPU PLPR PLDU PLDD PLPL PLPD (6501) (6502) {6504) (6511) (6512) (6514) (6521) (6524) - Skip on Plotter Flag - Clear Plotter Flag - Pen Up - Pen Right - Drum Up - Drum Down - Pen Left - Pen Down The plotter flag is set by the completion of a plotter command affecting the pen or the drum. It is cleared by the PLCF command only. The pen and drum command:; do not affect the plotter flag. The following modifications to the LINC-8 Simulator Trap Processor will enable it to run LINC or LINC-8 programs which operate the plotter in the manner described above: 9 C· .... ~-~-~--~-- . . . .----··,ri.>.."l:,"';'- ,.,_.,_., ._. .,._,.,., . . . .,. . . . . --~""""',,,,.,..,,...,_~~-~- ~-"'"'-""'"·'· 0 1. Replace the instruction at symbolic location OTHER with the following instruction: nTHER, JMP PLOT 2. Add this subroutine to the program iust after symbolic location ENDX. (Actually, the routine could be inserted anywhere before TABE, which is the last location loaded into memory segment 0 by the loading sequence.) I /SIJHI~ TO klll\I XYJ~'. CO[\ITkOI /MO!lF: llS I Nfi H<APPEIJ OPF<.'>. Pl OT, STf\ 1 Pl. INST, 0 BCL FkOM I.JN(; ADA I -OPR-12 APO JMP PLERF< ADA I 6 APO JMP PL ERR A Of\ T ADD Pl .TAH-1 STC • +I HI T PI fiCJ STC Pl Ji' /Sf\V~ JNSTF<UCTJON /JGi\!OkE li\ISTklJCTif1['I l HIT i /OPR /NO. 12 OR LESS? ERROR /YES. /OPF< /NO. /YFS. OK SO 5 ~~?\f< cm MORE? Ekf<OR OHTr1JN COIV1Mf\i\llJ /H FC OMLS f\ JJJJ P L.T/\H 1 l'-1 c fJMOIH~ Pl r; O, Pl CF. HLT PLSF JMP • - I 1 l i\JC LMODE /f~ETlJk[\J JMP RET I /INSTRUCTION PL ERR, PL TAB, NOT RECOGNIZED LOA PL.INST JMP ERR PDP PM ODE PLPD PLPU p J_i) u PUllJ Pl Pl< I' I PI TO USER /DO ERROR STC1P /PEN DOWi\J. DPk /pf,~N UP /Df<UM DO~JM /J)]<LJM UP /Pl·.l'J HIGHT /J-'l<'f'.J U·l·T .f!PI< S 1;· I I f·Jf: I f"ifl!JI· These modifications are most easily made by modifying the program's source and reassembling the program, as opposed to manually inserting the new instructions from the computer console. 10 0 ! c 6. 3 Adaption for Convenient Loading of the Trap Processor from a GUIDE or LAP6-3L Tape A particularly convenient way of using the trap processor with an existing GUIDE or LAP6-3L tape is to copy the program in exactly its present form onto some otherwise unused tape blocks and subsequently load it directly from these tape blocks using console functions. The advantage of this loading procedure is that it involves only the tape with the programs which are to be run with the trap processor. No separate DIAL tape is required for program loading purposes. Procedures are given below for copying the trap processor onto a GUIDE or LAP6-3L tape and for subsequently reading it back into core for use with a LINC or LINC-8 program. Note that the program is stored in pairs of blocks which begin at blocks having block numbers which are multiples of 10 - e.g., blocks 10 and l l, or 230 and 231. This is done so that the tape group instructions WCG and RCG may be used to effect the tape operations involving the programs. Notice also that this procedure may be used with LINCtape5 other than GUIDE or LAP6-3L tapes. Procedure to Copy the Trap Processor onto a GUIDE or LAP6-3L Tape: c.· l. Load the Trap Processor from a DIAL tape using the usual procedure. 2. Press I/O Preset. 3. Mount a GUIDE or LAP6-3L tape on unit 0. 4. Set in the Left and Right Switches: Left Right 0705 lXXO (XXO is the first tape block of the pair of hloc.ks in which the program is to be stored.) 5. Press DO. The Trap Processor will be written into the designated tape block. Procedure to Load the Trap Processor from a GUIDE or LAP6-3L Tape: 1. Press STOP. Mount the GUIDE or LAP6-3L tape on unit 0. 2. Press I/O Preset. 3. Set in Left and Right Switches: Left Right 0701 lXXO (XXO is the first tape block of the pair of blocks onto which the program has been copied.) 4. Press DO. The Trap Processor will be read into memory segment 2. 5. Press Start 20. The Trap Processor will relocate itself from segment 2 into segment 0 and the GUIDE or LAP6-3L System will be loaded and started. c 11 0 6.4 Adaption for Convenient Loading with a User Program from a DIAL Tape The LINC-8 Simulator Trap Processor is designed to be loaded into memory ahead of user programs. In normal use, it is loaded into memory segment 2, and relocates itself into segment 0 as soon as it is started in order to leave segment 2 free for user programming. It is not difficult to modify the trap processor so that it may be loaded directly into segment 0. This modification may be made in the assembly source of the program, and this modified source may be assembled along with a DIAL source of the user program. Such a source may be obtained from a LAP6 source through use of the program CONVERT. The resulting program may then be filed and retrieved from LINCtape as a single binary program. However, once the program is loaded from LINCtape, one of the trap processor restarts must be executed in order to initialize the trap processor and set the Instruction Trap Enable Flip-Flop. Production of a source modified for segment 0 loading consists of the following three steps: l. Insert the pseudo-op SEGMNT 0 before the first line of code in the source program. 2. Replace the instructions in location 20 and symbolic location RST400 with "JMP INIT". This step prevents entry to the trap processor relocating program. 3. Delete all instructions after symbolic location TABE. These instructions comprise the trap processor relocation routine, which is no longer needed. 6. 5 0 Adaption for Loading of Programs Other than GUIDE and LAP6-3L by the Trap Processor It is easy to modify the trap processor to load programs other than GUIDE or LAP6-3L when using the automatic loading and starting feature. The code which implements the load and start feature begins at symbolic location GUIDE+ 1. It is quite straightforward: r;t I 1 J) I·., .JM!' l. IJI" J f\J IT 11r·1lT1 /\I I tr.. Ti<f\f' R DC 1 LJvrn LDF '..l LIF 2 DJR JMP l'l<ULI· ;;;.,()H ~' /ffr(\I) (JlJ]IJF ;_;·rn1n hLOCK /INTO OUARTER 1, SEGMFNl I L100 ~ /START GU IDE As on example, suppose that the trap processor is to be used with a LAP6 version other than LAP6-3L. Suppose the LINC-8 or classic LINC console procedure for loading and starting the other LAP6 version consists of executing the double-word tape instruction RCG 7300, and then pushing "START 20". The trap processor will perform this operation if the code at symbolic location GUIDE is replaced by the following: 12 0 c· GUJDF, JMP INIT LDF LOA i! fRAP PROC~SSOR /PUT RCG 73Vl0 IN //101 (:, J'.\NU LJ0 l 7 RCG ;_; T f\ ~01 /JNITJALIZE (, I flf\ 1:rn0 ;_; T f1 ;; V11 7 LOF I lF ciMP I JUHP T0 LJO l f., The instruction RCG 7300 is inserted into locations 16 and 17 in memory bank 2 - i.e., 4016 and 4017 - and is immediately executed from these locations.* The next insl·ruction is taken from location 4020. This is the starting location of the program. 6.6 Adaption to Suppress Teletype Character Echoing The trap processor echoes characters typed by the computer operator on the console teleprinter in addition to transmitting them to the user program. This character "echoing" may be suppressed by removing seven instructions beginning at symbolic location LOOl. After modification, the section of the program near LOOl should look like this: I Ill>, STC (\(; STC \JI-'(; I"l FrJk TkA~l~H k 1r;JH1k tUT fJVJ·I~ bUrFFk PIT /k r~f\IJ C Hf\k f\ ~JI J /CL Ff1k Kl,CYH0/1k!J Flfifj /kr_ TlJI-rn TO USFR PROGRAM /ST (JkF. IOR KR Hf\ 1 r 1r1 J , JM!-' I /TL LE GAL CHARACTF.R RETX, LOA /PRINT UP ARROW. *One might ask here, "What happens if the RCG im.truction fails at, say, block 301 ? The computer will try to execute the RCG again from the beginning, but the instruction will have been destroyed by the arrival in core of block 300." The answer is that when the PDP-12 tape control retries an instruction, it does not read the instruction from core a second time. It uses the same data it obtained when the instruction was read initially. c 13 0 Qi 0 l ""1 n (1 ·.: ' ' • i '\J ·C· .. t r'\! N ¢ I"- 0 •O ' J ..() ¢ <t ,!\ t\l ..~ (\J"" "' 1 ~ ~ ~J l':'.l C'J -O<t <t<t"1"' <¥<¥ r-... " C (\J I") <t '°'°"' ""' <-:;;: Xod'<t ,.... ,_ i.... 1- n. (';> :>!';lt<;> -"> 1- N "' W<>"<( ro ro w i... u WW:f'.:11)1- WI-->- <<-llnO.. IX: D:: Q'. a: er VJ V> VI >- >- t- t- -:::> ----- - AC 4242 CDFX 4171 DOKBD 425r ENDX 4.36? ERR 41.3,: F'ETCH 416! GOMAN .a472 GRC 4262 GUIDE 403S !NIT 4356 KBD 0515 KCCA 6032 KRBA 6036 KRSA 6034 LC 4225 LOO 432:5 L001 4327 LOW 4317 LP 4255 M70 4135 ONE 4136 CPR 0500 OP14 4212 OTHERS 4211 OVL 4222 OVN 4247 PC 4134 PRINT 4.550 Q 4232 0 -~er- --~--------- 0 ·~ ------ --- ------- 0 c ( 0472 0473 0474 0475 0476 0477 0500 05 01 0502 0503 0504 0505 05.:16 121507 05Hl 0511 0512 0513 0514 0515 0516 0517 0520 0521 0522 11!523 0524 0525 0526 0527 0530 0472 060ii GCJM~N, '1473 b~33 .'.474 k:Jl5 7 Jt-<P /THIS LANDS IN FIELD 0 GUIDE /TRAP PROCESSOR RELOCATOR SETUP, SET 17 LI~ ~475 z, e ~tC i476 102 ~'. LOA ;:4 77 iS Jic.' 6356 .; '.'!? 1fJ 4£ ST A 0?Zl [~~~e· 2il 522 4025 252'3 STC LDF (' 1 2504 C640 0361 ei~~, 7334 ~506 kJvl 62 0507 2017 Vl510 2263 0511 0512 0513 0514 0515 e516 k:'017 2517 0520 0521 0522 0523 0524 0525 J526 0527 0 1023 1062 0221 6512 0062 2677 0061 7757 1020 6033 1062 0221 6524 6017 2i 0 ! /SET UP RESTARTS IN IT /SET UP 20 RESTART RST400 0 SET I 1 -TABE+17 SET l 2 2017 SET I 3 17 LOA I 3 STA I 2 XSK l 1 ,-3 JMP SET I 2 2677 SET l 1 -20 LOA JMP GU IDE STA 2 I XSK l 1 ,-2 JMP JMP 17 /SET UP 400 RESTART /SET DATA FIELD TO 0 /SET UP MOVE COUNT /SET TO-ADDRESS /BIT 1 <2~010) SAYS USE OF /SET FROM•ADDRESS /BIT 1 (0°000) SAYS USE IF /INCREM, 3,GET (3) /INCREM.2,STORE C2l /INCREM, 1, SKIP IF 1=1777 /1 NOT 1777, LOOP AGAIN /SET UP FOR LEFT /SWITCHES RESTART /20 JMP GUIDE S 0 /INC 2, STORE INTO <2> /END CHECK 0 0 0373 0374 (') 0375 .. " .... .._ ... 0376 " ... ""' c 121377 12140121 041211 :' .:..; ~ 04:212 ~ ~ 0403 c -. r.::1404 041215 0406 0407 041121 . 0411 121412 ) ,,- '") .... . . . ~ ..: ~- .; ~...; ... - ( ~ ·1 ~ :.... ... TA81 :.. .) -:':- -=-::;: .., : .... :- 7676 2376 76:4 7670 7676 7676 7656 7676 1276 7676 767 6 7676 7676 7676 7676 7676 2376 7614 7676 <:: 2::i 5 2265 62:5 :676 7 76 6215 1676 7676 ~ ~-' ..... i. ' L : ~ ... ::-; / , ~ -:;it- <-' 4: .3 .., :; i t t.). 41, .! -6- 0 ..,::: ~ .., 6 7 ~ : ~:::: r~ .! :. ~ 0413 :· 4:., ;: 42 0415 0416 ~~2: Ll .?~22 ~~23 .:' 42 4 .: 42 5 z4 2 ~ -:t.27 {432 2.52j 13 76 7 67 6 7 67 6 :- 0414 0417 0420 0421 0422 0423 121424 .042~ 0426 0427 0430 0431 0432 r\ ~ ,' 5: : ..; .. .:0: 2 ~ I I - 7 670 'c; . 2 63 2063 : 64 l4 .52 ?433 ~ ... ...... "'" ."' J 3~ ~3:4 1764 2100 0102 1113el4 0506 1()710 1176 7676 ·? v ~- -- ...,. 'X z:22 l4 -i; ~ ::~: 5 £436 l:., 0433 •' .. 3 7 :.:. 76 0434 0435 121436 121437 044121 0441 0442 121443 121444 121445 0446 0447 0450 121451 121452 0453 121454 0455 0456 0457 0460 ~~4i 7 0 76 .. ..,."" ;t -.L 244: ::::. 7 ~ ~ 442 7 6 :- 6 ~443 242? 2627 6176 7676 ,?44 5 3,? 3: i446 3233 3435 2425 2627 3031 3233 3435 (_ 4,,..(.. .5637 3637 ~ .;5: 0:~41. 4ill41 ,'4:>2 4243 4243 4445 4647 511151 5253 ;'' 4 4 [447 ~ ~ .... .., ..:'~53 4~45 ~·454 .; ::i4 7 ~455 o; • o;. L"~56 =-253 ... ~.., :; ~5 5 i t.. o;' ....... . r:.c-z: _:'461 \ ~ "' ,; ..... ..... ,.t:_ .... 1.. .... ...L 5455 6621 6 f.2: ... ...,..,f... I ' ' ::·:, TAB[, 7676 7676 /ALTMODE-CAS(/4~TMODE-CASE /RUBOUT-DE~/LEADER-NULL /N9T USED IN, U, IN, U. /BEL~/N, lJ, /TAB/L. >, -"1ET A IN. J. /CR-EOLIN, U, IN, /N, /N, /N, IN, /N, /N, u, U, U, U, U, U, U, /ALTMODE-CASE/N, U, /N,U,/SPACE•SPACE /EXC,PT/DBL,QUOTES /NUMBER SIGN/DOLLAR SIGN/PERCENT-P,C/AMPERSAMD-AMPERSAND /APOSTROPHE~AP,/OP PAREN /CL PARD1/* /PLUS-+/COMMA-, /MINUS··/PERIOD- • IS LA SH ·S LA SM ll ER 0-0 /1/2 /3/4 /5/6 1718 /9/N,U, /SEMICOLON!< /EQUAL SIGN-:/) /?/AT SIGN /AIB /CID /E/F IGIH !IIJ /KIL /MIN /O/P /Q/R /SIT /U/V /WIX I Yli /LEFT.BRACK/BACK SLASH /RT.BRACK/UP ARROW /BACK ARROW/N,U. I 121461 'c.-., ~t: 0462 ~Je-' t35t 0463 0464 0465 121466 ~46? 6472 '-'46c 0474 fl467 ~46 7 6.55b ~ W I ... 11·,JTIAL START 20 SETuP .;MP JMP I NIT JMP GOMAN ::l iZ0, I /INITIAL START 400 JMP SETUP J"'P !NIT ~T400, /l~!T:ALllE TRAF PROCESSOR ~ ' , 121274 121275 0276 0277 030121 0301 0302 0303 0304 0305 121306 0307 03Hl 121311 0312 0313 0314 0315 0316 0317 0320 0321 0322 0323 0324 0325 0326 0327 033121 0331 0332 0333 0334 0335 0336 0337 0340 0310 0311 0312 04?1 2313 122;; i'.: 2 3 4242 6221 ;; 314 :'.'31'.5 0316 APO CLR STC 0011 4252 121344 121345 0346 0347 /SAVE !T FOR USE AFTER /CASE C~ARACTER IS OUTPUT /GET CASE CHARACTER S TC AC ,,IMP REi /STORE FOR /EXIT L.DA IL8~ER 2317 <i32 0 1120 0055 0321 Ql451 0322 ['.;323 Z011 ~'32 4 0325 0326 D327 0330 0331 0-532 i 1 333 0334 03-55 0-536 4242 4252 0502 L.Sri, TRA~SFER CASE CHARACTERS ADA I L:JO, APO CLR STC STC !OB KRBA 102f_1 JMP SAE 215 JMP LOA 0212 212 6350 JMP JMP 6350 1460 /MAKE IT Ll~C CODE 55 6036 L001, 0215 6221 6221 AC UPC· /STORE IT FOR TRANSFER /CLEAR LEFT OVER BUFFER PRINT /READ CHAR AND /CLEAR KEYBOARD FLAG /ECHO IC, R,? RET /NO, EXIT /YES, THROW IN /A FREE LINE FEED PR INT RET I /ILLEGAL CHARACTER RETX, LDA I /PRINT UP ARROW 0337 0340 1020 0336 336 l13 41 635;:> 0342 0343 050Zi JMP !OB KR BA JMP COM ROL I 1 JMP LP 6036 6352 0344 0345 0346 0017 0347 6255 e261 PRINT /ECHO OFFENDING /CHA RA CTER, PRINT /SET LINK BIT /TO KEYBOARD "PAUSE" VALUE I 0302 0350 0351 0352 4 351 43::>2 4353 6046 0353 0354 0355 121356 4354 5.552 6141 v,355 6000 03::>o i-h;tl i· 3? 7 l0 3 6 l-' 4252 0361 tEROES I te350 0357 0360 ~!NUS UPC 23 0341 0342 0343 /DELETE 6041 /PRINT A CHARACTER /ENTER W ASCII CHAR IN AC PK!NT, PDP PM ODE TLS TSF JMP .-1 LI NC LMOOE JMP 0 /IN!T!AL!2E THE TRAP PROCESSOR !\JlT• ~)~~ ~~ 1 CLR STC AXO lJPC /CLEAR LEFT OVER CHARACTER /BOILER PLATING FOR GUIDE /RESTART /GET SPEC, F~S. REG, /SET TRAP ENABLE BIT 0362 121363 <1361 0C24 0364 0365 cl.56 2 0363 1622 1000 10iiHc 0366 121367 0370 0371 -:~-.~~,2 0.364 065 0004 6000 ESF JMP 0 /READ IT BACK OUT /RETURN ~ 040121 6025 JMP RST401ZJ !GO TO START 400 ..,./ SFA BSE ENOX, *40~ /CONTROL ROUTINE 0 ., ' , ""II "'\'i;;:; <'Ii 7 0 Z177 3202 eiu: n -- c122 4 ;\~);.:; £; c .. ,., :: 22 t Z2 27 z 2 30 Hl20 000 J321 ..1 0043 0017 0202 ~231 1020 0203 0204 0205 0206 0207 2232 0000 Z2..53 ~314 0210 0211 0212 0213 0214 0215 0216 0217 0220 0221 0222 0223 <7224 0225 0226 0227 02..56 l24:!. :{242 i'2 43 22 44 2245 0240 0247 05 00 6244 0000 3777 J25i <:1325 (1262 0263 0264 0265 0266 026 7 1020 00 00 0450 RTJ STC A 'JA AC, RTJ, OVN, 0 DJR /RESTORE AC IINH!B!T tERO CLOBBERING /IN USERS MEMORY SEGMENT /RESTORE INTERRUpT BUFFER /BECOMES JMP TO USER PROG, IO B RMFA HLT 3777 /K8D PROCESSING 5 DOK8D, RQR /PUT TRAPPED l~STRUCTION BIT INTO COMPUTER /LINC BIT /GET LEFTOVER CHAR, I IF ANY /LEFTOVER CHARACTER? /YES. DELI VER IT T 0 USER /NO, FRESH CHARACTER? /YES, GO READ IT /NO, PAUSE? /YES, HANG IN THERE /TILL KEY STRUCK, /NO, RETURN TO USER W. AC /CLEARED UPC, LP, LOA 0 AtE JMP KST JMP LOO GRC LtE JMP LP JMP LOO I 0262 <1263 0264 J265 C266 J267 ?27 a 0271 l272 2273 Z274 2275 0011 2\5>')0 6034 1120 7602 033'1 /READ AND TRANSLATE GRC, CLR !OB KRSA ADA -175 ROR 8CL 1560 4276 1300 ADA TAB STC LOH 04~11 ;12 76 ,_. . 2 r 7 2ll" e'>0 0 1420 SHO ... 76,t."",0 7600 "~ S;c' 1 6.537 JMP <.)3 ;!2 112 ,) 7722 ADA ') (, "( ' -... V IU 0303 0304 <J305 1 A ~EYBOARQ CHARACTER /READ A CHARACTER /CALCULATE CHARACTER CON/VERS! ON TABLE INDEX IN /HALF WORDS 37021 3700 1120 /ADD BASE ADDRESS OF TABLE • +2 /HALF-WORD PICKUP ADDRESS /GET TYE LINC CHARACTER, /JS IT AN UNDEFINABLE? RE.TX /YES. ECHO UPARROW /IS IT UPPER CASE? LOW /NO, .55 APO JMP 0451 6.517 I 02713 0271 0272 BSE JMP /LOADS Q REGISTER /FROM AC /OBTAIN ADDRESS FOR RETURN /TO USER PROGRAM II 6323 0254 0255 0256 0257 026<? 0261 14 I 2261 Ql251 0252 0253 ROR LJA 0241 21242 0246 0247 0250 Cl ' LINK~ /RESTORE /RESTORE LOCATfON 0 /RESTCRE Q REGISTER Li) A 0 140 2l236 0245 2 l~Z(J 0237 0242 0243 0244 SET 17 014<'1 1620 6000 42 46 1120 0000 J006 6323 0435 6262 0452 6255 0235 1 22.S4 2251 02 52 2253 254 2255 0256 2257 2260 02 30 0231 0232 21233 0234 2 K 8R ~235 'l 2 3 7 J2 40 /GET LINK L.. DA LC' /ITS AN UPPER CASE CHARACTER 0306 ri 7 .~.., 1120 ADA {):r?I o4 1 11 I /MAKE IT LINC CODE ~ 'O 'IJ f 0 012177 010121 011211 121102 12111213 011214 0105 121106 0107 121110 0111 0112 0113 0114 0115 121116 0117 0120 0121 0122 0123 0124 0125 0126 0127 0130 0131 0132 0133 0134 0135 0136 0137 0140 0141 0142 0143 0144 IH45 0146 0147 0150 0151 11.115 2 r1J153 0154 0155 0156 0157 0160 0161 0162 0163 121164 0165 0166 121167 0170 121171 0172 0173 0174 ~~';;.:....iii-~... ~:.;.;.. ~ /TRAP ENTRY AND MACHINE STATE SAVING •141 0141 e142 '11143 0144 0145 4242 0261 4225 0005 0241 0455 2136 4232 0146 0147 015e 0151 0152 0153 0011 0154 0155 4222 0057' 0156 0000 STC ROL STC QAC ROL AC 1 LC 1 QL. i! ADD ONE STC Q ADD ONE FLO CLR STC OVL SET 17 2136 0454 /SAVE AC /SAVE L!Nt< /GET H 0 11 Q REG BITS /GET L 0 BIT /SAVE IT /GET OVERFLOW BIT IF ON /SAVE !T,0=0FF, 1=0N /SAVE LOCATION 0 0 I 0157 0002 4160 4161 4162 4163 4164 0234 0335 1371 3364 74'12 7240 1140 3334 1734 4165 4166 4167 4170 4171 4172 0173 0174 0175 0176 0177 0200 0201 0202 0203 0204 0205 0206 0207 0210 0211 0212 0213 0214 0215 0216 0217 0220 0201 6141 1460 0515 0467 0250 1460 0535 ii'467 6250 1460 0534 0467 6212 1460 0514 6130 1000 0242 05N.' 61:146 /INSTRUCTION IDENTIFICATION. PDP PMOOE /READ I~TERRUPT BUFFER FETCH, RIB /GET INSTRUCTION FIELD M7VI AND /MAKE IT INTO A CDF N CDFX TAD ,+1 DCA /BECOMES CDF N 7402 /SET AC TO •1 STA /COMPUTE ADDRESS OF 140 TAD /TRAPPED INSTRUCTION PC DCA /OBTAIN INSTRUCTION PC TAO /CAUSING TRAP /SET DATA FIELD TO 0 COFX, COF LINC LMODE /IS IT KBD? SAE I KBD /NO SKP /VES, OOKBD JMP /IS IT KBD I? SAE KBD /NO, SKP /YES, DOKBD JMP /OPR I 14? SAE QPR 14 /NO SKP /YES OP14 JMP /OPR 14? SAE QPR 14 /PUT JMP TO ERR OTHERS, JMP /CHECKS FOR OTHER /INSTRUCTIONS HERE, /OUTPUT, GET CHARACTER OP14, LOA AC IOB /OUTPUT IT TLS4 108 0500 TSF'A JMP 6041 6216 /CHECK IF DONE ,-2 I "'21 ""'222 0223 1020 0000 2247 /RETURN TO USER PROGRAM /EXIT TRAP PROC~R RET, L.DA I ovi., ADD 0 OVN /3777 CAUSES av 0 0300 0001 0002 0003 0004 0005 0el06 0007 0010 0011 0012 0013 0014 0015 0016 0 01 7 0020 0021 0022 0023 0024 0025 0026 0027 0030 0031 0032 0033 0034 0035 0036 0037 0040 0041 0042 0043 0044 0045 H46 0047 0050 0051 0052 0053 0054 0055 0056 0057 0060 0061 0062 0063 0064 0065 0066 <>2l 1~ ! 'vC-8 s p10:.. ATCR TRAP PROCESSOR, ~ I 1:0P•Rl~~T /~AY\A~C, 0074 0075 , ( EQUIPMENT CORP, OlGITAL ' '1ASS. I /J, LA\~Btl~, 27 ~AY 1969 /REvlSEJ 2~ Ju~Y 190~ /REV!SEJ 8 AUGUST 1969 I /OPERAT!J\ 8EF"l\!T!O~S rOR LINC MODE ASSEMBLY /OF' PDP•8 MODE !OT lNSTRUC!ONS KCCA:6032 KRS060.34 KR806036 TSF"A:;;6i/J41 TLSA:;6046 RMF' A=6244 I /SOME LINC·8 DE•INITIONS OPR=500 KBD=51? I •2;?! 0020 0021 6463 JMP ST20 0o43 LDF" 3 2 k::rt'12 0602 ur: 0023 0006 0020 JMP 0024 OJR 20 /BECOMES JMP INIT /GO TO 20 IN SEGMENT 2 /(04020) I /4'1li2l RESTART RST400, JMP L.Dr tHl27 0466 0643 0602 0030 0~06 DJR 00·51 012!00 b400 HLT 0025 0026 11rn32 Llf' JMP ST400 /BECOMES JMP INIT 3 2 400 /GO TO 400 IN SEGMENT 2 I (04400 l I 0033 . 6356 0034 0642 0'135 0 /11!0 7400 00:S6 0037 0643 0040 0602 0041 7400 /START GUIDE JMP GU IDE, LDr RDC I NIT 2 7400 LDF' Llr JMP 3 2 140~ /READ GUIDE START BLOCK /INTO QUARTER 3,SEGMENT 2 /START GUIDE I /ERROR STOP •130 0130 01.H .H:l012l ERR, 6221 Hi.T JMP RET /UNIDENTIFIED INSTRUCTION /IN AC AT HLT. RETURNS TQ /USER w AC CLEARED WHEN !CONTINUE PRESSED, I 0067 0070 0071 l'l072 011173 :969, ~ OE~-s llB. /~ISC CONSTANTS •134 0134 0000 PC, 0 0135 0136 0070 0001 M?0, 70 ONE, 1 \ /ADDRESS Of TRAPPED /INSTRUCTION 0 c 0
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies