08/09/2005 Christian Corti Short reference for the LGP-30 simulator - version 1.70 ------------------------------------------------------- 1. Files -------- The simulator consists of the main program LGP30_EN.EXE. In addition there are subdirectories with the suffix .TRM that contain "snap shots" of the drum contents. These can be created und recalled in the simulator. LGP30_EN.EXE Main program PTP/ Directory with paper tape images for the LGP-30 START.TRM/ Directory with the drum contents named "START", 9.0 (bootstrap) and 10.4 (monitor) have already been loaded onto the drum. 2. Start -------- Simply call LGP30_EN within the directory containing the files. The console screen appears. When calling the simulator several options can be given on the command line. They are: /? Show options /S Activate serial console This options redirects all input/output of the simulated Flexowriter to a serial port. The Start key on the Flexowriter is simulated by a BREAK (e.g. BREAK key on a RS232 terminal). Syntax: /S:port,baud,par,bits,stop port: Number of the COM port (0,1,2,3) baud: Baud rate (e.g. 9600) par: Parity (N=none, E=even, O=odd) bits: Number of data bits (7 or 8) stop: Number of stop bits (1 or 2) /P Activate output to printer Output to the simulated Flexowriter will be sent to PRN (standard printer of DOS). Input is still done with the keyboard at the computer. Syntax: /P:1 /L Run at low speed This option reduces the operating speed of the simulator to about the original speed of a LGP-30. Even on a 4.77 MHz 8088 system the simulation runs faster than the original system. /Z Clear default drum The drum will be completely cleared when starting the simulator and won't have the contents from the last simulator run. 3. Usage -------- After starting the simulator the console screen will appear first. The console is divided into several areas: - Status (topmost screen line) The current status of the simulator is shown, following states are possible: HALT - Execution has stopped COMPUTE - Program/instruction is currently executed OVERFLOW - Execution has stopped due to an overflow in the accumulator INPUT - Program requests input from the simulated Flexowriter (keyboard) When reading a paper tape (from a file) the notice 'READ' will appear on the left side, when writing a tape (into a file) 'WRITE' will appear. - Register display (top right) The register display corresponds to the scope tube of the LGP-30. On the display: instruction counter, instruction register and accumulator. Below the mask for Order, Track and Sector is indicated. Left to the mask the current instruction which is in the instruction register is shown; with empty register therefore Z 0000. - Operating mode (top left) With the given keys the operating mode can be changed, the current mode is highlighted. One can select Normal operation, One operation (single step mode) and Manual input. The third mode allows input into the accumulator when pressing the return key, either 4 bits or 6 bits depending on the status of the "6-Bit Input" switch. - Memory dump (middle) In this field is displayed the contents of the drum. Always 8 sectors are shown at the same time. Left to the bitwise display is the address of the sector in the form [track, sector], and left to the address the decoded instruction in the sector (see mask). Navigation through the drum is done with the help of the cursor keys. The key bindings are shown on the left as an aid. - Console keys (bottom) The keys on the LGP-30 are mapped to the keys F1 to F10 on the keyboard. Like on the real LGP-30 only keys which are highlighted are active in the current operating mode. All output to the Flexowriter is done on a second screen that can be seen with Alt-F2, and also all input from the keyboard. The console screen is displayed with Alt-F1. One of the most important programs on the LGP-30 is the program 10.4 that is used to read in other programs or to assemble programs (with address conversion). For this purpose a snap shot of the drum called START has beed made with 10.4 already loaded, it can be loaded into the simulator with Ctrl-L. In the same manner Ctrl-S saves the entire drum including registers. An example at the end will show how to use the simulator. 4. Key short cuts ----------------- Alt-F1 Show the console on the screen Alt-F2 Show the Flexowriter input/output on the screen ESC Quit the simulator, or terminate input into the accumulator (only when status is INPUT) Ctrl-L Load drum The name of the drum must not have any extension like .TRM Ctrl-S Save drum The same restrictions for the name as above apply here. The name will be extended with the extension .TRM. A directory of this new name will be created and two files, REGS.MEM and TROMMEL.MEM, will be stored in this directory. Alt-I Change input source Available input sources are the keyboard (K) and a file (F). The option papertape (P) needs special hardware and thus won't work in normal environments. Alt-O Change output destination Available destinations are the screen (S), which can be seen with Alt-F2, and a file (F) to redirect or capture the output. The same as above applies for the option papertape. Alt-T Trace When trace has been turned on all instructions which are executed will be logged into a file together with the registers. N Normal This is the normal operatig mode of the LGP-30 O One operation Pressing the Start button will execute only the next instruction. M Manual input In this mode input from the keyboard can be put into the accumulator. Pressing starts the input operation, terminates input. F1 Start F2 Clear counter - the instruction counter is set to zero. F3 Fill instruction - the contents of the accumulator is transferred into the instruction register F4 Execute instruction - the current instruction in the instruction register is executed F5..F8 Breakpoints - These are conditional breakpoints that can be tested in a program F9 6-Bit input - Instead with 4 bits each character will be put into the accumulator with its full 6 bit code F10 Transfer control - A conditional jump that can be tested by the -T ("minus T") instruction The keys F5 to F10 also work while the program awaits input from the keyboard. A. Example ---------- Compilation of the program "lunar lander" (only German version available) with the ACT-V compiler and start of the compiled program. Following paper tapes are needed (each as a file on disk): ACT-V compiler, ACT-V basic subroutines, source code for "lunar lander", square-root subroutine. 1. Loading of the drum with 10.4 Ctrl-L -> start As already stated above do only type "start", not "start.trm" or similar. 2. Loading the ACT-V compiler Alt-I -> F -> ptp\act5 The display "Input from Keyboard" will change to "Input from File". If the file could not be found the computer will beep and the display won't change. After this: N (Switch to normal operation) F1 (Start) 3. Loading the ACT-V basic subroutines Alt-I -> F -> ptp\act5bs O (One operation) F2 (Clear counter, i.e. restart 10.4) N (Normal) F1 (Start) 4. Compiling the source program Alt-I -> K (Switch to input from keyboard) O F2 N F1 At this point 10.4 awaits some input (INPUT flashes in the corner), in this example the compiler must be started now. Enter: .0002000 F1 The simulator will stop immediately (HALT) because some break points need to be set, input must be switched to 6 bit and the source program must be made ready for reading. So enter: F7 F8 F9 Alt-I -> F -> ptp\mondl F1 The source program is read and compiled. At the end of the compilation the compiler will print the symbol table. NOTE: Don't forget to switch between the screens with Alt-F1 and Alt-F2. It also works while the simulator is running. 5. Loading of the square subroutine The symbol table shows that the label s000 (= last code address) is at address 1042. This information is needed to find a place for the square root. A good place is 1045. F7, F8, F9 (release keys) Alt-I -> K O, F2, N, F1 (restart 10.4) Now enter this: ;0001045 F1 /0001045 IMPORTANT: Terminate input prematurely with ESC. Alt-I -> F -> ptp\wurzel F1 Alt-I -> K 6. Finally: Starting of the compiled program O, F2, N, F1 Enter: .0000300 F1, F1 Now have fun playing this game! (Don't forget: Always enter numbers with the sign, e.g. +30 instead of 30!) If you plan to play the game in the future again you should save the drum so that only have to reload it and press F1 to start the simulation. You should do the following steps before or after point 6: O, F2, N, F1 Enter: .0000300 F1 (only one time!) Ctrl-S -> [name, e.g. LUNAR] (Name without extension!) When starting the simulator the next time the game is simply started with Ctrl-L -> [name, see above] N F1