UsingTheControlPanel - pkimpel/retro-1620 GitHub Wiki
The IBM 1620 had a large Control Panel on the front of its desk-like main cabinet. The panel had three sections – a bar at the top with logos and captions, a set of gray and blue panels in the middle with many lamps and a large rotary switch, and a white panel at the bottom with additional lamps switches and buttons.
The retro-1620 emulator attempts to faithfully represent the Control Panel in a window that opens automatically when you start the emulator. It looks like this:
The bar at the top of the Control Panel shows an IBM logo of the time, a 1620 Model 2 logo, and the caption "DATA PROCESSING SYSTEM." Portions of this bar have some non-obvious functions that are discussed below under "Control Panel Diagnostic Features."
The panels in this section have numerous small round lamps that represent the state of "gates" (flip-flops) and register bits in the system.
CONTROL GATES – this panel has lamps that show the state of gates used to control instruction execution in the system. We do not have comprehensive documentation on the function of all of these gates. Some of their functions can be determined from their captions. The function of several of these lamps will be mentioned in this and other wiki pages.
INPUT-OUTPUT – this panel has lamps for gates that control I/O operations in the system, e.g., RD indicates that a read operation is in progress and WR indicates that a write operation is in progress. REL indicates that an I/O operation is in the process of being "released" (i.e., terminated) either manually or automatically. Most of the lamps on the second and third rows apply to disk I/O. The lamps on the bottom row of this panel apply only to the IBM 1710, a process-control variant of the 1620.
INST & EXEC CYCLE – the lamps in this panel indicate the various states the CPU goes through when fetching and executing instructions. Those with "I-" captions refer to the I-cycles, which fetch instructions from memory and prepare the CPU to execute them. The "E-" captions refer to the E-cycles, which execute instructions after they are fetch. The "IA-" captions refer to three states that control indirect addressing during the I-cycles. The "IX" caption refers to states that apply index registers to operand addresses during the I-cycles. The MULTIPLIER/QUOTIENT (MQ) register in the next panel indicates the specific indexing state when the "IX" lamp was on.
OPERATION REGISTER – this panel shows three registers in the CPU. Each row represents one decimal digit in the register. The 8-4-2-1 bits show the binary-coded decimal (BCD) value of the digit. The C bit is the "check" or odd-parity bit.
- OPERATION REGISTER (OR) – this two-digit register holds the "opcode" (operation code) for the current instruction. This code determines what the instruction does.
- MULTIPLIER/QUOTIENT (MQ) – this one-digit register has various functions as both storage and a counter, depending on the current opcode. The name comes from its use in multiply and divide operations.
- DATA REGISTER (DR) – this two-digit register is used for temporary storage during I-cycles and E-cycles. Its odd (units) digit also holds the addend/subtrahend/multiplier/divisor during arithmetic instructions. This register does not support flag bits, but when data is loaded into the register, the FL-1 control gate is set to the odd digit's flag bit and the FL-2 control gate is set to the even digit's flag bit.
MEMORY BUFFER REGISTER – this panel shows two registers used as the interface between the CPU and core memory. The third row of lamps is not used.
- MEMORY BUFFER REGISTER (MBR) – this two-digit register holds the data when a location is read from core memory. The 1620 reads two digits at a time from memory: a digit at an even address and the digit at the next-higher odd address. The same digit pair is read regardless of the value of the low-order digit in the MEMORY ADDRESS REGISTER (MAR). Digits are processed singly or in pairs, depending on the opcode and E-cycle state. The digits in this register have an extra bit, F, representing the flag bit for the digit.
- MEMORY INHIBIT REGISTER (MIR) – this two-digit register holds the data that is to be written to core memory. As with read, two digits at a time are always written to memory at an even and odd address specified by the MEMORY ADDRESS REGISTER. Instructions generally operate by reading two digits in MBR, acting in some way on one or both of them, moving the result to MIR, and writing the updated digits back to memory, although often at a different address.
MEMORY ADDRESS REGISTER (MAR) – this five-digit panel normally shows the contents of the Memory Address Register, which determines the location from which digit pairs are read into MBR and written from MIR. When the system is in MANUAL mode (halted), it can display the value of other registers, as described next.
MEMORY ADDRESS REGISTER DISPLAY SELECTOR – this panel has a large, 12-position rotary switch. Each position is associated with an address register in the CPU. There are two ways to change the position of the switch:
- Clicking within the silver-ish "bowl" of the switch (it was recessed into the panel on a real 1620) will move the tip of the switch knob one step in the direction of the click.
- Clicking one of the circled captions around the periphery of the bowl will step the switch to that position.
The position of this switch is preserved across emulator restarts.
When the system is in MANUAL mode (i.e., the white MANUAL lamp on the bottom panel is lit), pressing the DISPLAY MAR button on the lower panel will display the value of the currently-selected register in the MAR lamps. If the system is not in MANUAL mode, the DISPLAY MAR button is disabled. Once the system returns to AUTOMATIC mode, the MAR lamps will revert to showing the address being read or stored in memory.
For more information on the address registers used in the Model 2, see the "1620 Console" and "Appendix B" sections of the IBM 1620 Central Processing Unit, Model 2 manual or the IBM 1620 Model 2 Reference Card.
The bottom section of the Control Panel contains the lamps, buttons, and switches of most interest to someone operating the 1620.
On the right side of this section is a row of 13 rectangular lamps, and below that a row of 13 dark-blue buttons. Three of the lamps and two of the buttons are not used.
The lamps show important status and alarm conditions for the system:
- POWER ON – this green lamp turns on automatically when the emulator is started from the home page and the Control Panel window opens.
- POWER READY – this white lamp comes on a couple of seconds after the window opens. At that point the emulator is ready to use. On a real 1620, it took about 15 minutes for the power supplies to stabilize and this lamp to come on.
- THERMAL – on a real 1620, this orange lamp would light if the internal temperature of the system became too high. In the emulator this lamp is turned on only when the emulator detects an internal emulation error. Such an error also results in a Check Stop. The lamp is turned off when the RESET button is clicked, which also resets the Check Stop.
- WRITE INTERLOCK – this orange lamp will light if a write operation is initiated on a device that is not ready to receive data. This lamp may come on during normal operations for the Card Punch, Line Printer, and Disk devices when they are temporarily busy. It will also come on when the Paper Tape Punch encounters an error while punching.
- READ INTERLOCK – this orange lamp will light if a read operation is initiated on a device that is not ready to send data. This lamp may come on during normal operations for the Card Reader, and Disk devices when they are temporarily busy.
- SAVE – This white lamp will light when the SAVE button below it is pressed to cause the address in the IR-1 register (the address of the next instruction to be executed) to be copied to the PR-1 register. It turns off when the RESET button is pressed or when a Branch Back (BB, 42) instruction is executed to restore IR-1 from PR-1 and branch back to the saved address.
- TWPR SELECTED – This white lamp will light when the Typewriter device is selected for input or output, including when the INSERT button is pressed. It turns off automatically when an I/O operation is completed or when the RELEASE button is pressed.
- AUTOMATIC – This white lamp will light when the CPU is in automatic mode, i.e., when it is executing instructions or performing I/O operations.
- MANUAL – This white lamp will light when the CPU is halted. Both the MANUAL and AUTOMATIC lamps may be on when using the INSTANT STOP/SCE button, as discussed below.
- CHECK STOP – This orange lamp will light when the CPU has stopped due to an alarm or check condition. It is turned off when the check condition is reset by a Branch Indicator (BI, 46) or Branch No Indicator (BNI, 47) instruction or when the RESET or CHECK RESET button is pressed.
The buttons below these lamps control the operation of the 1620:
- POWER – Double-clicking this large toggle switch will "power down" the emulator and close the Control Panel and I/O device windows. Any unsaved output to the Typewriter, Line Printer, Card Punch, and Paper Tape Punch will be lost, as will be any unread data in the Card Reader or Paper Tape Reader. The emulator can be restarted from its home page. Double-click is used with this switch to prevent accidentally shutting down the emulator.
- RESET – clicking this button will reset most of the control gates in the CPU, as well as the check indicators discussed below. The button is effective only in MANUAL mode.
-
MODIFY – this button is used with the CHECK RESET button to initialize a clear-memory operation. The button is effective only in MANUAL mode. On a real 1620, you would press MODIFY and CHECK RESET simultaneously, which would turn on the CLR MEM gate. Then pressing the START button would clear the system's core memory to zeroes. In a web browser, simultaneous presses usually are not possible, so there are two ways to use these buttons:
- Click MODIFY and then immediately click CHECK RESET. That will turn on the CLR MEM gate. Clicking any other button after MODIFY aborts the clear operation.
- Click and hold MODIFY, then drag your cursor over to the CHECK RESET button and release. That will turn on the CLR MEM lamp. Clicking RESET will abort the clear operation.
- CHECK RESET – used without MODIFY, this button clears all of the check indicators and turns off the CHECK STOP lamp. This button can be pressed at any time.
- DISPLAY MAR – As discussed above, this button is used in conjunction with the large rotary selector switch to display one of the CPU's address registers. The button is effective only in MANUAL mode.
- SAVE – This button copies the address in the IR-1 register to the PR-1 register and turns on the SAVE lamp, as discussed above. It is typically used to mark the current place of execution in the program while doing manual debugging. This button is effective only in the MANUAL mode.
-
INSERT – this button prepares the Typewriter to read instructions and data from its keyboard in decimal mode (digits, flags, and record mark only).
- It also sets the IR-1 and OR-2 registers to zero, places 36 in the OPERATION REGISTER to command a Read Numerically (RN) operation, turns off the MANUAL lamp, and turns on the TWPR SELECTED and AUTOMATIC lamps.
- The button is effective only when the system is in the MANUAL mode and the CHECK STOP lamp is not lit.
- Each digit entered from the keyboard is stored in memory starting at address 0, incrementing by one for each digit.
- Keyboard input is terminated when:
- the RELEASE button on the Control Panel is pressed,
- the R/S key on the typewriter is pressed (
#
in the emulator), or - after the 100th digit is entered from the keyboard and stored at address 99.
- Pressing the START button on the Control Panel (or the R/S key on the Typewriter) then starts the CPU executing at address 0.
- RELEASE – Pressing this button will terminate any non-disk I/O operation that is in process, including input initiated by the INSERT button. The button is effective only when the system is in the AUTOMATIC mode and an I/O operation is in process. If the TWPR SELECTED lamp is on, it is turned off. The AUTOMATIC lamp is turned off, the MANUAL lamp is turned on, and the system is placed in MANUAL mode. Pressing the START button at that point will execute the next instruction in sequence. See Using the Disk Drive for information on the special release method used to terminate hung disk I/Os.
- START – This button will place the system in AUTOMATIC mode and then start (or restart) the CPU executing instructions. The button is effective only in the MANUAL mode. It is not effective when the CHECK STOP lamp is lit.
-
STOP/SIE – This button can be used to single-step through instructions. SIE stands for Single Instruction Execute.
- The button is not effective when the CHECK STOP lamp is lit.
- If the system is in the AUTOMATIC mode, pressing this button will cause it to halt at the end of the current instruction and place the system in the MANUAL mode.
- If the system is already in the MANUAL mode, pressing this button will cause it to execute the next instruction in AUTOMATIC mode and then halt in the MANUAL mode.
- Pressing the START button after this button will resume continuous execution in AUTOMATIC mode.
-
INSTANT STOP/SCE – This button can be used to single-step through the memory cycles of most instructions. SCE stands for Single Cycle Execute.
- The button is not effective when the CHECK STOP lamp is lit.
- If the system is in the AUTOMATIC mode, pressing this button will cause it to halt at the end of the current memory cycle. The system will remain in the AUTOMATIC mode unless that was the last cycle for the current instruction, in which case the system will be placed in the MANUAL mode.
- If the system is already in the MANUAL mode (only possible before the first cycle of the next instruction to be executed), pressing this button will cause it to execute the first memory cycle of the next instruction in AUTOMATIC mode and then halt while still in the AUTOMATIC mode.
- In either case, the MANUAL lamp will be on after each press of the SCE button.
- The AUTOMATIC lamp will remain on except after the last cycle of an instruction.
- Pressing the START button will resume continuous AUTOMATIC mode.
- Pressing the STOP/SIE button will resume execution until the end of the current instruction.
- Note that this button cannot be used to step through memory cycles when an I/O instruction is executing, except when doing output to the Typewriter and Paper Tape Punch devices. It also cannot be used to step through memory cycles when a Disk I/O instruction is loading the digits of its Disk Control Field.
To the left of the operational lamps and buttons are a set of round lamps and toggle switches. The settings of the toggle switches are preserved across emulator restarts.
There are four switches in this area, numbered 1 through 4. The state of these switches can be interrogated by Branch Indicator (BI, 46) and Branch No Indicator (BNI, 47) instructions, allowing a program to take alternate paths based on the switch settings.
The array of small round lamps in this area indicate "check" or error conditions caused by hardware and software issues.
- The first column of lamps is not used.
- The second column indicates Disk errors.
- Third column indicates parity and addressing errors within the CPU. The ADDR CHK lamp indicates a variety of errors including MAR parity errors, invalid memory address errors, and invalid opcode errors.
- The fourth column indicates non-Disk errors with I/O devices or with the transfer of data from a device into core memory.
- The fifth column indicates overflow errors detected by the CPU, including arithmetic (add/subtract) overflow and floating-point exponent overflow. The first lamp in this column is not used.
See the "1620 Console" section in the IBM 1620 Central Processing Unit, Model 2 manual for detailed explanations of each of these lamps and the Check Stop switches below.
Below the Check Indicator lamps are five switches that control how the system reacts to check conditions when they arise. The left-most of these switches is not used.
When one of these switches is in the PROGRAM position, detecting a check condition of the type indicated by the lamps in the column above it causes an indicator to be set internally, but the program does not halt. These indicators can be tested by the Branch Indicator (BI, 46) and Branch No Indicator (BNI, 47) instructions to select an alternate path for the program to follow.
When one of these switches is in the STOP position, detecting its type of check condition will cause the CPU to halt at the end of the instruction in which the condition was detected. The program can be resumed by pressing the START button. The internal indicator for the condition remains set until reset by a BI or BNI instruction, or by pressing the CHECK RESET button.
On the far left of the bottom panel is an Emergency Off switch. On a real 1620, the white section in the center of the switch could be pulled up to immediately shut off power to the entire 1620 system. Doing so could damage the system, and once the switch was pulled, a visit by an IBM Customer Engineer (CE) was required to reset the switch.
In the emulator, there is no need to use the Emergency Off switch, but nonetheless, NEVER DOUBLE-CLICK THIS SWITCH!
The Control Panel supports a few non-obvious diagnostic features. These features are intended primarily for debugging the emulator and running diagnostic programs, and are subject to change in the future.
The diagnostic features are controlled by a small panel that is opened by double-clicking the IBM logo on the left of the bar at the top of the Control Panel. The options on this panel are described in the following sub-sections.
The panel can be closed at any time by clicking its Close Panel button. Some of the features described below will close the panel automatically when they are activated.
The values of the 12 address registers can be viewed one at a time by selecting the register using the large rotary switch and pressing the DISPLAY MAR button, but this works only when the system is in MANUAL mode, and it can display only one register at a time.
Ticking the Register Debug View check box on the Debug Options panel will toggle the visibility of the Register Debug View panel, which will display immediately above the AUTOMATIC, MANUAL, and CHECK STOP lamps. This panel will show the decimal values of all 12 address registers, plus MAR and a register used for internal address manipulations, XBR. Viewing this panel could be useful when you are debugging a program or single-stepping with either of the STOP buttons.
The panel can be open or closed from the Debug Options panel at any time. The visibility state of the panel is saved and restored across emulator restarts.
The emulator maintains a few statistics on its internal performance throttling mechanism. These are displayed above the EMERGENCY OFF switch whenever the Address Register Debug View Panel is displayed. It shows the following values:
- TA – The average throttling delay in milliseconds. This shows the average amount of time the emulator suspends execution of its Processor module so that real time can catch up to the internal emulation clock. This value will vary with the performance of the browser and underlying workstation, and may take several seconds to stabilize after starting execution, but values in the range 8-12ms are typical. If this number goes negative, it means the emulation is running slower than real time.
- ΔD – The average throttling delay deviation in milliseconds. The deviation is the difference in the amount of delay the Processor requested of the browser and the amount of delay that actually occurred. This value also depends on the browser and underlying workstation, but values in the range 2-7ms are typical.
- RT – Total run time in seconds, i.e., the total amount of time the Processor is in AUTOMATIC mode.
- IR – Average instruction execution rate in instructions/second. This is a running average computed over the prior five seconds of AUTOMATIC time. When the Processor is not in AUTOMATIC mode, the average does not change. Note, however, that the Processor remains in AUTOMATIC mode during I/O operations and STOP/SCE single-cycle stepping, so the instruction rate will likely decrease significantly during those operations.
The emulator has an additional panel of gate status lamps that opens in a separate window. This window is visible whenever the Aux CE Panel check box on the Debug Options panel is ticked. The panel is intended primarily for use in debugging the internals of the emulator; most of the lamps in this panel are associated with the mechanization of floating-point instructions.
You can close this window at any time, either by unticking its check box on the Debug Options Panel or simply by closing the window using your operating system's close-window control. The panel can be reopened later from the Debug Options panel. The open state of the panel is saved and restored across emulator restarts.
CMEM is a file format (extension .cmem
) developed by the IBM 1620 Jr. project at the Computer History Museum in Mountain View, California, as a way to load core-memory images into a 1620 emulator. It has been used primarily as a way to load diagnostic routines into the system for execution.
The retro-1620 emulator supports both loading CMEM files into its memory and dumping the entire contents of its memory in CMEM format. To activate these features, open the Debug Options panel as described above.
To load a CMEM file into memory, click the Browse... or Select File... button on the Debug Options panel. From the resulting file picker select the file you want to load. It must be in the CMEM format, which is discussed below. The load will only take place if the system is in MANUAL mode.
A load begins by clearing all of memory to zeroes. If the load is successful, the Debug Options panel will close automatically. If errors in the file are detected, an alert will pop up on the screen giving the number of errors and a description of the last one detected. The load will still have taken place, but any invalid digits in the file will have been stored as zeroes.
Whether any errors occurred or not, the IR-1 register will be set to zero, and a system reset will take place as if the RESET button on the Control Panel had been clicked. No other registers or gates will be affected by the load process. You can press the START button if appropriate to start executing the image at address 0, or use the INSERT button to enter a branch (49) instruction to start execution of the image at a specified location.
To format and view the current contents of core memory in CMEM format, click the View CMEM Dump button on the Debug Options panel. This dump may take place at any time, even while the system is running.
The emulator will open a temporary window, format the CMEM data into it, and close the Debug Options panel automatically. From the temporary window you can copy, save, or print the data on your local system as desired. When finished with the temporary window, simply close it.
In addition to formatting the contents of memory as hexadecimal CMEM digits, the dump will format the digit pairs on a line as their alphanumeric equivalents and display them to the right of the digits, separated by a //
comment delimiter. The digit pairs are converted to ASCII glyphs in the same manner as for the Card Punch. Digit pairs not having an ASCII equivalent shown as underscores, _
.
A sample of the CMEM format is shown below. Contiguous whole lines of zero digits are replaced by a blank line.
11980: 1 1 1 1 0 10 0 4 7 10 0 2 3 1 A 10 0 6 7 10 // __ )0____0
12000: 0 4 3 1 A 10 7 9 13 10 0 0 12 2 A 10 9 5 13 10 // )__9_ ____
12020: 1 6 12 2 A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 // ___
12180: 0 0 0 0 0 10 1 10 0 4 2 2 10 2 10 0 4 0 2 10 // +)__ _-
12200: 3 10 1 2 6 2 10 4 10 1 4 2 2 0 0 0 0 0 0 0 // __S)_B-
12800: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 6 1 0 // ^+
12820: 1 1 1 0 0 7 6 7 2 5 0 0 5 5 1 0 0 7 6 7 // _+_X_ N+_X
12840: 4 9 1 0 0 4 4 15 9 5 5 4 4 5 4 6 2 6 3 10 // I+)E_MEF^_
12860: 0 4 2 1 15 9 5 5 4 4 5 4 4 9 5 5 10 0 4 0 // )/RNDMIN _
To save the current contents of memory as a CMEM file, click the Save CMEM File button on the Debug Options panel. This dump may take place at any time, even while the system is running.
The emulator will convert the contents of memory to CMEM format as described for viewing memory in CMEM format above, and open a standard save-file dialog to save the CMEM data as an ASCII text file to your local system. The dialog provides a default name, which you can change before saving. If your browser saves the file without opening a dialog, check your browser settings – there should be an option to select how downloads are to be saved.
A CMEM file is an ordinary ASCII text file. Lines in the file are processed as follows:
- Blank lines are ignored.
- Lines that begin with
/
(optionally preceded by spaces) are treated as comments and are ignored. - Lines that begin with a 1-5 digit integer followed by a colon
:
are interpreted as data lines. The integer is the memory address at which the data in the line after the colon is to start loading. The format of the data after the colon is described below. - Lines that begin with a colon
:
are also interpreted as data lines, but the starting address is implied to be the address of the last digit loaded plus one. - Lines that begin with an asterisk
*
are interpreted as option settings. The two options currently defined are:-
*invalid
– indicates that invalid hexadecimal digits in the data to be loaded (i.e., anything other than hex 0-9, A, C, or F) are accepted as is; otherwise invalid digits are considered to be an error and are loaded as zeroes. -
*tabs
– this is followed by a comma- or space-delimited list of 1-relative tab stop positions that are to be loaded into the Typewriter.
-
- Any other lines are considered to be an error and are ignored.
Thus, a typical data line might look like this, which will load addresses 900-919 with the digit values after the colon:
00900: 0 1 0 8 4 0 0 9 1 14 0 1 0 8 4 0 0 19 12 14
When loading a CMEM file, retro-1620 ignores leading and trailing spaces in the lines. The portion of a data line after the colon consists of a sequence of one- or two-digit hexadecimal numbers separated by one or more spaces. If the number has two digits, the first digit must be a zero or 1, and represents the flag bit for the digit. The second or only digit must have the case-insensitive value 0-9, A, C, or F, unless the *invalid
setting has been specified, in which case hexadecimal values B, D, and E are also accepted. A /
anywhere in the data line causes the rest of the line to be ignored.
When dumping a CMEM file, retro-1620 includes comment lines at the beginning with the date, time, selected register settings, and other system state. This allows the CMEM dump to serve as a basic system memory dump.
The dump also suppresses contiguous lines containing only zeroes, replacing each such run of lines with a single blank line. Since memory is cleared at the beginning of a CMEM load, suppressing these zero lines generally allows the dump file to be smaller.
The retro-1620 dump does not include either *invalid
or *tabs
settings lines, but may include hexadecimal B, D, or E digits if they are present in memory.
As an alternative to viewing the current contents of core memory in CMEM format, you can view it in "MemDump" format by clicking the View MemDump button on the Debug Options panel. You may find this format more convenient for vizualizing the contents of memory and for debugging. As with the other diagnostic dumps, this dump may take place at any time, even while the system is running.
The emulator will open a temporary window, format the dump into it, and close the Debug Options panel automatically. From the temporary window you can copy, save, or print the data on your local system as desired. When finished with the temporary window, simply close it.
The dump is formatted in groups of 50 digits as two lines per group. The first line has underscore characters, _
, representing flag bits for the respective digits below them on the second line. Following the digits on the second line and a //
comment delimiter, the digit pairs are translated to their alphanumeric equivalents. The digit pairs are converted to ASCII glyphs in the same manner as for the Card Punch. Digit pairs not having an ASCII equivalent shown as underscores.
A sample of the MemDump format is shown below. Contiguous whole lines of zero digits are replaced by a pair of blank lines.
_
04000: 96603983470404401200160396600000490409200000460406 // ____G))__ _.__ I)_- F)_
04050: 80010039040810010047040920030048707176000A46039840 // __ _)_+_ G)_-. H016 |F.__
04100: 0200490427200000630A000000000000000000000000000000 // _ I)_- T|
_ _ _
04250: 00000000000000000000001610100042953904117101004904 // _++ B__)_1_ I)
04300: 3560000000000000000000000000000000000000435128A000 // __ CJ__
_ _ _
04350: 0968A031043320434314043340096847044280120049044760 // _Y__)=-CC*)=__YG)B__ I)G_