Digital PDFs
Documents
Guest
Register
Log In
DEC-12-SI1B-D
December 2000
26 pages
Original
1.3MB
view
download
Document:
dec-12-si1b-d
Order Number:
DEC-12-SI1B-D
Revision:
Pages:
26
Original Filename:
https://svn.so-much-stuff.com/svn/trunk/pdp8/src/dec/dec-12-si1/dec-12-si1b-d.pdf
OCR Text
mum PDP-12 LIBRARY LINC-8 SIMULATOR TRAP PROCESSOR Order DEC-12-SI1B-D from Program Library, Digital Equipment Corporation, Maynard, Massachusetts 01754 Price $1.00 Direct comments concerning this document to: Software nformation Service I Digital Equipment Corporation Maynard, Massachusetts 01754 CONTENTS Pag 1. Abstract 2. Equipment and Storage Requirements 2.1 Equipment 1 1 1 2.2 Storage 3. Loading, Starting and Restarting 2 2 3.1 Loading Procedure 3.2 Normal Starting Procedure (Start 400) 3.3 Starting Procedure for Immediate GUIDE or 2 2 LAP6-3L 3 Loading and Starting (Start 20) 3.4 The Instruction Trap Enable Flip-Flop 3.5 Normal Restart (Start 400) 3.6 "User 20" Restart (Start 20) 4 3.7 GUIDE Load Restart (Start 700-717) 4 4. Program Operatlpn 4.1 Illegal Teletype Characters 4.2 Undefined Instruction Error Stop 5. Internal Operation 3 3 4 5 5 5 5.1 Overview 5.2 Console Starts and Restarts 5.3 Operation of the Instruction Trap Hardware 5 5.4 Machine State Saving 5.5 Instruction Identification 5.6 TYP Processing 5.7 KBD Processing 5.8 Return To User Program 6 6 7 7 7 7 8 6 LI NC-8, Simulator 6.1 Adaption To Process Additional 6.2 Example: Operating the XY12 Plotter Control with LINC or 6.3 LI 8 NC-8 OPR's 8 LINC-8 OPR's Adaption for Convenient Trap Processor Loading from or 6.4 Trap Processor Adaptions GUIDE LAP6-3L Tapes Adaption for Convenient Loading With a User Program From a DIAL Tape iii 9 11 12 CONTENTS (Cont) Adaption for Loading of Programs Other Than GUIDE and LAP6-3L By The Trap Processor Adaption to Suppress Teletype Character Echoing Assembly Listing 1 ABSTRACT . The LINC-8 Simulator Trap Processor handles Teletype input and output for LINC-8 and classic LINC programs when they are run on the PDP-]2. 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 a 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 instruc- tions for a number of useful adaptions are provided in this document, along with enough information on the internal operation of the program to permit users to easily implement adaptions of their own invention. It is In this connection, attention is directed to the Dispatch Table Trap Processor, DEC-12-SI2A. 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 is 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-SI1B-UA. 2. 2. 1 EQUIPMENT AND STORAGE REQUIREMENTS Equipment The LINC-8 Simulator Trap Processor is at present distributed in LINCtape form only, and therefore requires a PDP-12 with LINCtape control and at least one TU55 DECtape/LINCtape transport 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 pro- cessed no differently than the same instruction traps originating in basic memory. 1 2 2 . Storage The program occupies most of the locations below 462, plus locations 700 to 717, all in PDP-1 2 memory segment 0. 3. 3. 1 LOADING, STARTING AND RESTARTING Loading Procedure The program is distributed on a DIAL tape . Load and start that copy of DIAL , and type into DIAL, ILO L8SlM,0i (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-1 2 core memory, and the computer will halt. Normal Starting Procedure (Start 400) 3.2 Press I/O Preset, and then Start 400. The program will turn on the Instruction Trap Enable Flip-Flop and halt with the Instruction Field set to 2 and the Data Field set to 3. Trap Enable Flip-Flop is on by observing the console TRAP indicator. it is This indicator should be lit. If The error may be either a machine error or an operator not, some kind of error has occurred . error. Verify that the Instruction 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 Switch the processor mode to the PDP-8 mode by executing the PDP instruction (octal: 0002) before Mode changing through use of I/O Preset in conjunction with the console using the Binary Loader. 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 automatical ly load and start a LINC-8 GUIDE or LAP6-3L tape along with the trap processor, load the trap processor from the DIAL tape as directed above, and then press I/O Preset, Start 20, rather than I/O 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 does 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 However, in practice it is sometimes cleared (by the operator pressing I/O PRESET for problems. example), so some convenient methods for resetting it are included in the trap processor program in the form of the fol lowing restart procedures. 3.5 If Normal Restart (Start 400) 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) Field (IF) Set is . Note that the START 400 key may not be used for this unless the Instruction set to 0 because START 400 takes the high order 5 bits of the starting address from the IF 0400 into the Left Switches and use START LS, rather than Start 400. the Trap Enable Flip-Flop and halts the computer. firmed by observing the console TRAP indicator.) Use of this entry point sets (Setting of the Trap Enable Flip-Flop may be conPressing continue after the computer has halted causes a transfer to location 400 in memory segment 2 (absolute address 04400), with the Data Field set to 3. 3 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 Note that the START 20 key may not be used for this unless the Instruction Field (IF) is set to 0 3. because START 20 takes the high order 5 bits of the 15 bit starting address from the IF. Left Switches and use Start LS, rather than using 3.7 Set 0020 in the START 20, GUIDE Load Restart (Start 700-717) A third alternative is to start at any location between 700 and 71 7 in field 0. Use of any of these entry points sets the Trap Enable Flip-Flop and then loads 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 of the fact that a PDP-12 rather than a LINC-8 or classic LINC is being used. minor exceptions to this. The PDP-12 console operates slightly differently from the LINC-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 Teletype key. There are a couple of . and Bare obtained in the PDP-12 by striking a single The Teletype keys which are used to obtain the various LINC codes are indicated in the fo lowing diagram of the Teletype keyboard I Figure 1 . Location of LINC keys on the Teletype keyboard 4 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 Control is i I legal keys is struck, it is printed on the Teletype preceded by an not returned to the user's LINC-8 or classic LINC program until a legal character is struck The fol lowing Teletype keyboard characters are illegal: !, 4.2 ", TAB, (, ), *, ?, @, ], t, <, >. Undefined Instruction Error Stop The trap processor halts at location 130 in memory segment 0 when any instruction other than a Teletype input or output instruction is given address of the instruction 5 . 5 . is in . The trapped instruction is contained in the accumulator, and the location 134 of memory segment 0. INTERNAL OPERATION 1 Overview Teletype input-output in LINC and LINC-8 programs involves only three instructions: 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 LI NC-8 nstructions whose operation involves the LINC-8 Simulator Trap Processor. i The processing performed by the LINC-8 Simulator Trap Processor for the KBD and TYP instructions consists 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. is set by the hardware when the operator strikes a Teletype key. is no keyboard character available for the user program to read in. 5 This flag The trap processor clears it when there Processing for the trapped instructions KBD and TYP consists of three steps The first step consists of the identification of the instruction the occurrence of an instruction trap. causing the trap. Processing is initiated by . 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. In addition to the "trap processor proper", which performs as described above, the program as distrib- uted contains small amounts of code to implement the various console restarts described above. 5.2 Console Starts and Restarts The program is initial ly 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 LINCtape using the console functions ient Load ng of the Trap Processor from i . See Section 6.3, Adaption for Conven- GUIDE and LAP6-3 L Tapes , for a description of this the routine had to be loaded Into segment 0 directly, the console procedure for loading it procedure . If 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 initial ly 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 routine at symbolic location SETUP. tion field into memory segment 0. used only once. with This routine relocates the trap processor from the current instruc- Notice that the relocator routine is not itself relocated, since it is After the trap processor has been relocated, the locations 700 through 717 are fil led "JMP GUIDE". This operation provides for restarting of the GUIDE system using the Start Left Switches 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 ). instruction following the trap instruction is Also, the low order 12 bits of the address of the 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 5.4 Machine State Saving The instructions between 140 and symbolic location FETCH saves registers and indicators whose contents will be affected by the operation of the trap processor. to the user program . They will be restored before control is returned Notice that the Overflow flip-flop and memory location 0 are both saved . They 5.5 are both affected by the operations in the trap processor Instruction Identification 5.6 The code from symbol ic location FETCH to OP14 obtains the instruction causing the trap and transfers control to the subroutine which performs the LINC-8 function of the particular instruction. TYP Processing 5.7 TYP and TYP I (OPR14 and OPR I 14) are processed identically, by the subroutine beginning at OPII4. 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. KBD Processing The routine begins at tag OP15 and ends just before tag INIT. It has three functions. are interrelated and are not performed in any simple sequence by the routine. The functions 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. in (Part of the definition of the LINC KBD instruction is that characters which are read 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 LINC "special " characters (?, =, u, , , . , f, :) . Some 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" facility 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. 7 The second function of this routine is the interpretation of the I bit. when raised, means, This bit, "Don't execute the next instruction until a character from the keyboard has been acquired character has been typed , pause until the user types one , If no " . The final function of the routine is the clearing of the keyboard flag by the LINC KST instruction . . This is the flag which is sensed Note that when two LINC characters are generated in response to one Teletype character, the flag is not cleared until 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 1 1 execute the KBD instruction which col lects 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 values prior to entry to the trap processor. wi 1 1 simply restores the various registers in the machine to their Note that when the KBD instruction has been given the AC get fi lied with some character code rather than with its contents at the time of trap processor entry. 6. LINC-8 SIMULATOR TRAP PROCESSOR ADAPTIONS 6.1 Adaption to Process Additional LINC-8 OPR's LINC-8 and classic LINC instai lations often use instructions of the LINC OPR group for purposes other than control of the Teletype. For example, an installation controlling pen motion on an incremental plotter. one of six directions. In this section, may use OPR's 5, 6, 7, 10, 1 1 and 12 for Each OPR causes the pen to move one increment in we indicate how the LINC-8 Simulator Trap Processor may be "custom tailored" to process additional OPR's or other trapped instructions. In general , such modifica- tions involve three steps: a. extension of the trapped instruction identification routine to recognize trapped instructions 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. 8 The new instructions should be added at 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. Existing coding attends to the details of restarting the user program 6.2 Operating the XY12 Plotter Control with LINC or LINC-8 OPR's Example: Suppose that a LINC-8 or LINC user is operating an incremental p lotter with 6 OPR instructions which work as follows: OPR OPR OPR OPR OPR OPR 5 (0505) - lower pen - raise pen 6 (0506) 7 (0507) 10 (0510) - move drum up - move drum down 1 11 (0511) - move pen right unit 12 (0512) - move pen left unit 1 1 1 unit 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 fol lowing instruction does not begin unti I 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. he XY12 plotter control used the fol lowing PDP-8 mode commands: PLSF (6501) - Skip on Plotter Flag PLCF PLPU (6502) - Clear Plotter Flag (6504) - Pen Up PLPR (6511) - Pen Right PLDU PLDD (6512) - (6514) - PL PL (6521) - Pen Left (6524) - Pen PL PD Drum Up Drum Down Down The plotter flag is set by the completion of a plotter command affecting the pen or the drum. cleared by the PLCF command only. It is The pen and drum commands 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 1 . Replace the instruction at symbolic location OTHER with the following instruction: OTHERS 2. JMP PLOT Add this subroutine to the program just 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 . / /SUBR TO RUM XY12 CONTROL FROM LINC /MODE USING TRAPPED GPRS. /SAVE STA I PLOT, 0 PL INST, BCL INSTRUCTION /IGNORE INSTRUCT KTM I BIT I I ADA I -OPRAPO I JMP PLERR ADA 1 /OPR 12 OR LESS? ERROR /NO. /YES. OK SO FAR I 6 APO JMP PLERR PLGO, ADA I ADD PLTAB-1 STC .+1 HLT PLGO STC PDP PMODE PLCF HLT PLSF JMP .-1 LINC LMODE JMP RET /OPR 5 OR MORE? ERROR /NO. /YES. OBTAIN COMMAND /BECOMES ADD PLTAB + N /PLPU, PLPR, ETC /RETURN TO USER / /INSTRUCTION NOT RECOGNIZED PLERR, LDA PLINST JMP ERR PDP PMODE PLTAB, PLPD PLPU PLDU PLDD PLPR PLPL LINC LMODE /DO ERROR STOP /PEN DOWN. OPR /PEN UP /DRUM DOWN /DRUM UP /PEN RIGHT /PEN LEFT .OPR 5 12 These modifications are most easily made by modifying the program's source and reassembling the program, as opposed to manual ly inserting the new instructions from the computer console. 10 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 . is The advantage of this loading procedure 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 is . Note that the program stored in pairs of blocks which begin at blocks having block numbers which are multiples of 10 - e.g., blocks 10 and 1 1 , 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 LINCtapes other than GUIDE or LAP6-3L tapes Procedure to Copy the Trap Processor onto a GUIDE or LAP6-3L Tape: 1 . Load the T rap 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 IXXO (XX 0 is the first tape block of the pair of blocks 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: Mount the GUIDE or LAP6-3L tape on unit 0. 1 . Press STOP. 2 . Press I/O Preset 3. Set in Left and Right Switches: Left Right 0701 IXXO (XX 0 is the first tape block of the pair of blocks onto which the program has been copied 4. Press DO. 5. Press Start 20. . The Trap Processor will be read into memory segment 2. The Trap Processor will relocate itself from segment 2 into segment 0 and the GUIDE or LAP6-3L System will be loaded and started 11 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. normal use, it is In 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. processor so that it may be loaded directly into segment 0. It is not difficult to modify the trap 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 CO NVERT . program However, once the program is loaded from LINCtape, one of the trap processor restarts . The resulting program may then be fi led and retrieved from LINCtape as a single binary must be executed in order to initial ize the trap processor and set the Instruction T rap Enable Flip-Flop. Production of a source modified for segment 0 loading consists of the fol lowing three steps: 1 . 2. Insert the pseudo -op SEGMNT 0 before the first line of code in the source program. Replace the instructions in location 20 and symbol ic location RST400 with "JMP INIT" This step prevents entry to the trap processor relocating program 3 . Delete all instructions after symbol ic location TABE. processor relocation routine, which 6.5 It is is These instructions comprise the trap no longer needed. Adaption for Loading of Programs Other than GUIDE and LAP6-3L by the Trap Processor easy to modify the trap processor to load programs other than GUIDE or LAP6-3L when using the automatic loading and starting feature. at symbolic location GUIDE+1 GUIDES , It is The code which implements the load and start feature begins quite straightforward: JMP INIT LDF 2 RDC 7400 LDF 3 LIE 2 /INITIALIZE TRAP PROCESSOR /READ GUIDE START BLOCK /INTO QUARTER 3> SEGMENT 2 D JR JMP 1 400 /START GUIDE As an 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 trap processor will perform this operation if RCG 7300, and then pushing "START 20" . The the code at symbol ic location GUIDE is replaced by the fol lowing: 12 GUIDES JMP LDF LDA RCG STA INIT /INIT lALIZE TRAP PROCESSOR 2 /PUT RCG 7300 6 AND 40 I /40 1 IN 1 201 6 LDA 7300 STA I 201 7 LDF LIF JMP 3 2 1 6 /JUMP TO 40 1 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 instruction is taken from location 4020. 6.6 This is the starting location of the program 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: STC STC LOO. I AC UPC /STORE IT FOR TRANSFER /CLEAR LEFT OVER BUFFER RET /READ CHAR AND /CLEAR KEYBOARD FLAG /RETURN TO USER PROGRAM OB KRBA JMP LOOl . / /ILLEGAL CHARACTER LDA I RETX, /PRINT UP ARROW. *One might ask here, "What happens if the RCG Instruction 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 answer is that when the PDP-12 tape control retries an instrucdoes not read the instruction from core a second time. It uses the same data it obtained when the arrival in core of block 300. " tion, it the instruction was read initially. 13 eiee §001 0102 0003 i0i4 0005 0016 0017 0010 0011 0012 0013 1014 0015 0016 0017 0020 0021 0022 0023 0024 0025 0026 0027 0030 0031 0032 0033 0034 0035 0036 0037 004i ii41 0042 0043 0044 0045 0046 0047 0050 i@5i 0052 0053 0054 0055 0056 0057 0060 0061 0062 0063 0064 0065 0066 0067 0070 0071 0072 0073 0074 0075 • • 20 /LINC-8 simulator trap processor. DEC-12-SI1B . / /copyright 1969 /MAYNARD, MASS, . DIGITAL EQUIPMENT CORP , / LANGBEIN, 27 MAY 1969 /REVISED 21 JULY 1969 /REVISED 8 AUGUST 1969 /D, / /OPERATION OERNITIONS FOR LINC MODE ASSEMBLY /OF PDP-8 mode IOT InSTRUCIOnS KCCA86032 KRSA86034 KRBA«6036 TSFA«6041 TLSA«6046 RMFA«6244 / /some LINC-8 definitions OPR»500 KB0«515 / • 20 0020 0021 0022 0023 0024 JMP LOF LIF OJR JMP 6463 0643 0602 0006 6020 ST20 /BECOMES JMP INIT 3 2 20 /GO TO 20 IN SEGMENT /(04020) ST400 /BECOMES JMP INIT 2 / 0025 0026 0027 0030 0031 0032 6466 0643 0602 0006 0000 6400 /400 restart RST400, JMP LOF LIF OJR HLT JMP 3 2 400 /GO TO 400 IN SEGMENT / (04400) 2 / 0033 0034 0035 0036 0037 0040 0041 6356 0642 0700 7400 0643 0602 7400 /START GUIDE JMP GUIDE. LOF ROC 7400 LOF LIF JMP INIT 2 /READ GUIDE START BLOCK /into QUARTER 3, SEGMENT 2 3 2 1400 /start guide RET /UNIDENTIFIED INSTRUCTION /IN AC AT HLT, RETURNS TO /USER W AC cleared WHEN /continue pressed, / 0130 0131 0000 6221 /error STOP • 130 HLT ERR. JMP / /MISC CONSTANTS • 134 0134 0000 PC. 0 0135 0136 0070 0001 M70. ONE. 70 1 /address of trapped /instruction 0076 0077 0100 0101 0102 0103 0104 0105 0106 0107 0110 0111 0112 0113 0114 0115 0116 0117 0120 0121 0122 0123 0124 0125 0126 0127 0130 0131 0132 0133 0134 0135 0136 0137 0140 0141 0142 0143 0144 0145 0146 0147 0150 0151 0152 0153 0154 0155 0156 0157 0160 0161 0162 0163 0164 0165 0166 0167 0170 0171 0172 0173 0174 / 0141 0142 0143 0144 0145 0146 0147 0150 0151 0152 0153 0154 0155 0156 4242 0261 4225 0005 0241 0455 2136 4232 213 6 0454 0011 4222 0057 0000 /TRAP ENTRY AND MACHINE *141 STC AC rol 1 STC LC QAC ROL 1 QL2 ADD ONE STC Q ADD ONE FLO CLR STC OVL 17 SET I state saving /SAVE AC /SAVE LINK /GET H 0 11 Q REG BITS /GET L 0 BIT /SAVE IT /GET OVERFLOW BIT IF ON /SAVE IT,0=OFF, isON /SAVE LOCATION 0 0 / /instruction identification. 0157 0002 4160 4161 4162 4163 4164 4165 4166 4167 4170 6234 0335 1371 3364 7402 7240 1140 3334 1734 FETCH, 4171 4172 6201 6141 COFX, 0173 0174 0175 0176 0177 0200 0201 0202 0203 0204 0205 0206 0207 0210 0211 1460 0515 0467 6250 1460 0535 0467 6250 1460 0534 0467 6212 1460 0514 6130 0212 0213 0214 0215 0216 0217 0220 1000 0242 0500 POP PMODE RIB AND TAD DCA 7402 STA TAD DCA TAD M70 CDFX /READ INTERRUPT BUFFER /GET INSTRUCTION FIELD /MAKE IT INTO A CDF N .+1 140 PC I PC CDF LINC /BECOMES CDF N /SET AC TO -1 /COMPUTE ADDRESS OF /trapped INSTRUCTION /OBTAIN INSTRUCTION /CAUSING trap /SET DATA field TO 0 LMODE OTHERS, SAE KBD SKP JMP SAE KBD SKP JMP SAE OPR SKP JMP SAE OPR JMP 0P14 LDA , /IS I IT KBD? DOKBD /NO /YES. /IS IT KBD I? DOKBD /NO /YES. /OPR I I . I I I 14? 14 0P14 I /NO /YES /OPR 14? 14 ERR /PUT JMP TO /CHECKS FOR OTHER /INSTRUCTIONS HERE, /OUTPUT, GET CHARACTER AC lOB 60 46 tlsa 0500 6041 6216 lOB /OUTPUT tsfa JMP IT /CHECK IF DONE ,-2 / /RETURN TO USER PROGRAM 0221 0222 0223 1020 0000 2247 RET, LDA OVL., 0 ADD OVN I /EXIT TRAP PROCESSOR /3777 CAUSES OV 0175 0176 0177 0200 0201 0202 0203 0204 0205 0206 0207 0210 0211 0224 0225 0226 0227 0230 0231 0232 0233 1020 0000 0321 0040 0017 1020 0000 0314 0234 0235 0236 0237 0212 0213 0214 0215 02 40 0241 0242 0243 1000 0140 1620 6000 4246 1120 0000 0006 02 16 02 44 05 00 0217 0220 0221 0222 0223 ^224 0225 0226 0227 0245 0246 0247 6244 0000 3777 02 30 0231 0232 0233 0234 0235 0236 0237 024 0 0241 0242 0243 0244 0245 0246 0247 0250 0251 0252 0253 0254 0255 0256 0257 0260 0261 0262 0263 0264 0265 0266 0267 0270 0271 0272 0273 LOA LC, /GET link I 0 ROR SET I /RESTORE link /RESTORE location 1 0 0 17 LOA Q* ROR LDA 140 BSE JMP STC ADA AC /RESTORE I Q REGISTER 0 /LOADS Q REGISTER /FROM AC /OBTAIN ADDRESS FOR RETURN /TO USER PROGRAM 14 I RTJ /RESTORE AC I 0 1 /INHIBIT EERO CLOBBERING /IN USERS memory SEGMENT /ReSjOrE InTeRrUrT BuFfEr /BECOMES JMP TO USER PROG, DJR lOB RMfA hit 3777 RTJ, OVN, / 0250 0325 0251 0252 0253 0254 0255 0256 0257 0260 1020 0000 0450 6323 0435 6262 0452 6255 0261 6323 /KBD PROCESSING ROR ookbd I , LOA UPC, LP, /PUT TRAPPED INSTRUCTION /I BIT into computer /LINC BIT /get leftover char, /IF ANY 5 I 0 AHE JMP KST JMP LHE JMP /LEFTOVER CHARACTER? /YES, DELIVER IT TO USER /NO. FRESH Character? /YES, GO READ IT /NO. PAUSE? /YES, HANG IN THERE /till key STRUCK. /NO, RETURN TO USER W. AC /CLEARED LOO I GRC LP JMP LOO / /READ AND TRANS LATE 0262 0263 0264 0265 0266 0267 0270 0271 0272 0273 0274 0275 0276 0277 0300 0301 0302 0303 0304 0305 0011 0500 6034 1120 7602 0301 1560 3700 1120 0401 4276 1300 0000 1420 7600 6337 1120 7722 0451 63l7 GRC, A KEYBOARD CHARACTER clr lOB KRSA ADA -175 ROR BCL 3700 ADA TAB STC LDH /READ A CHARACTER /CALCULATE CHARACTER CON/VERSION TABLE INDEX IN /HALF WORDS I 1 I /ADD BASE ADDRESS OF TABLE I . *2 /HALF-WORD PICKUP ADDRESS /get THE LINC CHARACTER. 0 SHD 7600 JMP ADA -55 APO JMP /IS IT AN UNDEFINABLE? I RETX /YES, ECHO UPARROW /IS IT UPPER CASE? LOW /NO, I / 0306 0307 1120 0011 /ITS AN UPPER CASE CHARACTER ADA /MAKE IT LINC CODE I 11 0274 0275 0276 0277 0300 0301 0302 0303 0304 0305 0306 0307 0310 0311 0312 0313 0314 0315 0316 0317 0320 0321 0322 0323 0324 0325 0326 0327 0330 0331 0332 0333 0334 0335 0336 0337 0340 0341 0342 0343 0344 0345 0346 0347 0350 0351 0352 0353 0354 0355 0356 0357 0360 0361 0362 0363 0310 0311 0312 0451 0011 4252 APO clr STC 0313 0314 0315 0316 1020 0023 4242 6221 LOA 23 STC JMP 0 36 4 0 36 2 0365 0366 0367 0370 0371 0372 /DELETE MINUS ZEROES UPC /SAVE IT FOR USE AFTER /CASE CHARACTER IS OUTPUT /get CASE character AC ret /STORE FOR TRANSFER /EXIT I / /loner CASE characters 0317 0320 0321 0322 0323 0324 0325 0326 1120 0055 0451 0011 4242 4252 0500 6036 LOW 0327 0330 6350 1460 0215 6221 1020 02l2 6350 6221 LOOl 03 31 0332 0333 0334 0335 0336 ADA . /make IT LINC CODE I 55 APO CLR STC STC LOO, UPC /STORE IT FOR TRANSFER /clear LEFT OVER BUFFER PRINT /READ CHAR AND /CLEAR KEYBOARD FLAG /ECHO AC lOB krba JMP SAE 215 JMP LOA 212 JMP JMP /C, I RET I R.? /NO. EXIT /YES, THROW IN /A FREE LINE FEED PRINT RET / 0337 0340 0341 0342 0343 0344 0345 0346 1020 0336 6350 0500 6036 6350 0017 0261 0347 6255 /ILLEG AL character /PRINT UP ARROW RETX LDA 336 PRINT JMP /ECHO OFFENDING lOB /CHARACTER KRBA PRINT JMP COM /SET LINK BIT 1 ROL /TO keyboard "PAUSE*' VALUE JMP LP I , , I / 0350 0002 435 1 4352 4353 4354 6046 6041 5352 6141 0355 6000 0356 0357 0360 0011 4252 0001 0361 0363 0364 0365 0024 1620 1000 0004 6000 04 00 6025 /PRINT /ENTER PRINT, A W character CHAR IN AC ASCI I POP PMODE TLS TSF .-1 JMP LINO LMODE JMP 0 /INITIALIZE THE TRAP PROCESSOR clr INI T /clear left over character UPC STC /BOILER plating FOR GUIDE AXO . ENDX, *400 SFA BSE 1000 ESF JMP JMP /RESTART FNS. REG, /GET SPEC /set TRAP enable BIT , I 0 /READ IT BACK OUT /RETURN RST400 /GO TO START 400 /CONTROL ROUTINE 0373 0374 0375 0376 0377 0400 0401 0402 0 40 3 0404 0405 0 40 6 0407 0410 0411 0412 0413 0414 0415 0416 0417 0420 0421 0422 0423 0424 0425 0426 0427 0430 0431 0432 0433 0434 0435 0436 0437 0440 0441 0442 0443 0444 0445 0446 0447 0450 0451 0452 0453 0454 0455 0456 0457 0460 0461 0462 0463 0464 0465 0466 0467 0470 0471 / / 0401 0402 0403 0404 0405 0406 0407 0 4 10 0411 0412 0413 0414 0415 0416 0417 0420 0 421 0422 0423 042 4 0425 0426 0427 0430 0431 0432 0433 0434 0435 04 36 0437 0440 0441 0442 0443 0444 0445 0 44 6 0447 0450 0451 0452 0453 0454 0455 0456 0457 0460 0461 0462 2323 1376 7676 7676 7676 7676 7656 7676 1276 7676 7676 7676 7676 7676 7676 7676 2376 7614 7676 2265 6215 1676 7676 2063 1764 2100 0102 0304 0506 0710 1176 7676 6176 7676 2425 2627 3031 3233 3435 3637 4041 4243 4445 4647 5051 5253 5455 6621 7676 7676 TAB. 2323 1376 7676 /ALTMODE-CASE/ ALTMODE -CASE /rubqut-oel/leader-null 7 67 6 /N, /N, 7676 7676 7656 7676 1276 7676 7676 7676 7676 7676 7676 7676 2376 7614 7676 2265 6215 1676 7676 2063 1764 2100 0102 0304 0506 0710 1176 7676 617 6 7676 2425 2627 3031 3233 3435 3637 4041 4243 44 45 TABE. 4647 5051 5253 5455 6621 7676 7676 /not used U. U. /BELL/N, U, /TAB/L, F. -META /N, U. /CR-EOL/N. /N. /N, /N, /N. /N, /N, /N. / U. U. U. U. U U. . U . U, ALTMOOE-CASE/N , U, /N.U, /SPACE-SPACE /EXC.PT/D8L .quotes /number SIGN/DOLLAR SIGN/PERCENT-P, C/ AM PE RS AMD- ampersand /APOSTROPHE-AP, /OP PAREN /CL PAREM/» /PLUS-+/COMMA/MINUS--/PERIOD-. /SLASH-SLASH/ZERO-0 / 1/2 /3/4 /5/6 /7/8 /9/N ,U, /SEMICOLON/< /equal sign-=/> /?/AT SIGN /A/B /C/D /E/F /G/H / I/J /K/L /M/N /0/P /Q/R /S/T /U/V /W/X / Y/Z /left BRACK/BACK SLASH /RT, BRACK/UP ARROW /BACK ARROW/N.U, , / / initial 0463 0464 0465 6474 ST20, 635fc 6472 start 20 setup JMP JMP JMP INIT GOMAN / 0466 0 46 7 0470 0471 6474 6356 0643 0000 /INITIAL START 400 ST400, setup JMP JMP INIT LDF hlt 3 /INITIALIZE TRAP PROCESSOR 0472 0473 0474 0475 0476 0477 0500 0472 0473 0600 6033 0474 0475 0476 0477 05 01 05 00 0502 0503 0504 0505 0506 0507 0510 0511 0512 0513 0514 0515 0516 0517 0520 0521 0522 0523 0524 0525 0526 0527 0530 0501 0502 0503 0504 0505 0506 0507 0510 0511 0512 0513 0514 0515 0516 0517 0520 0521 0522 0057 0000 1020 6356 1040 0020 4025 0640 0061 7334 0062 2017 0063 0017 1023 1062 0221 6512 0062 2677 0061 7757 1020 6033 1062 0221 6524 6017 05 2 3 0524 0525 0526 0527 GOHAN* LIT JMP 0 /THIS LANDS IN FIELD GUIDE /TRAP PROCESSOR RELOCATOR SET 17 SETUP, 0 0 LDA JMP STA I /SET UP RESTARTS INIT /SET UP 20 RESTART 20 STC ldf set RST400 0 I 1 /SET UP 400 RESTART /SET DATA FIELD TO 0 /SET UP MOVE COUNT -TABE*17 SET 2017 SET I 2 I 3 I 3 I 2 I 1 I 2 I 1 17 LDA STA XSK JMP SET 2677 SET -20 LDA JMP STA XSK JMP JMP .-3 /SET TO-ADORESS /BIT 1 (2-010) SAYS USE /SET FROM-ADORESS /bit 1 (0-000) says USE /INCREM. 3, GET (3) /INCREM,2,ST0RE (2) /INCREM. 1, SKIP IF 1«17' LOOP AGAIN /I NOT 1777 /SET UP FOR LEFT /SWITCHES RESTART /20 JMP GUIDE-S . I GUIDE I 2 I 1 ,-2 17 1 /INC 2, STORE INTO (2) /END CHECK 0000 ERRORS AC COFX OOKBO ENDX ERR FETCH GOMAN CRC GUIDE INIT KBO KCCA KRBA KRSA LC LOO LOOl LOW 4242 4171 4250 4365 4130 4160 4472 4262 4033 4356 0515 6032 6036 6034 4225 4323 4 32 7 4317 4255 4135 M70 4136 ONE 0500 OPR 4212 0P14 OTHERS 4211 4222 OVL 4247 OVN 4134 PC PRINT 4350 4232 0 LP RET RETX RMFA RST400 RTJ setup ST20 ST400 TAB TABE TLSA TSFA UPC 4221 4337 6244 4025 4246 4474 4463 4466 4401 4462 6046 6041 4252
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies