Sense switch
This article needs additional citations for verification. (August 2011) |
A sense switch, or program switch, is a switch on the front panel of a computer whose state can be tested by conditional branch instructions in software.[1] Most early computers had several sense switches. They were typically used by the operator to set program options.
Computer | Sense switches |
---|---|
IBM 701, IBM 704, IBM 709, IBM 7090, IBM 7094 | 6 |
IBM 1401 | 7 |
IBM 1620 | 4 |
IBM 1130 | 16 |
PDP-1 | 6 |
Data General Eclipse | 5 |
IBM's first commercial computer, the IBM 701 Defense Calculator, announced on May 21, 1952, had four lights and six switches on the upper right of its front panel marked Sense (see photo). The switches could be tested and the lights turned on or off under program control. The same number of sense switches and lights were on the front panels of all first and second generation machines in the IBM scientific computer line, the IBM 701, IBM 704, IBM 709, IBM 7090 and the IBM 7094.[2] IBM's Fortran language, first released for the 704, included statements to test the switches and set or reset the lights.
- IF (SENSE SWITCH i) n1, n2
- SENSE LIGHT i
- IF (SENSE LIGHT i) n1, n2
where n1 and n2 are statement numbers. SENSE LIGHT 0 reset all four lights.[3]: p. 18
On the IBM 1620 there are four switches, and their state can be tested via special forms of the IF-statement offered by the FORTRAN compiler for the IBM 1620. For the IBM 1130 there are sixteen switches matching the sixteen-bit word size of the computer, plus a toggle switch adjacent to the power on/off switch. These bit-switches are more normally used with the computer stopped to specify some memory address to be viewed (via the indicator lights on the front panel), or set. The state of these switches can be determined by a program, and so a running program might modify its behavior depending on the switches, such as change the amount of progress information printed, alter the tactics of a multi-variable optimization attempt, and so on. The IBM 1130 also has an "Interrupt Request" key associated with the console printer, whose pressing might cause a suitably programmed long-running program to type a progress report on the console printer. In the more usual batch job environment, it was pressed by the computer operator to signal the operating system to terminate a running program that had perhaps overrun its allowed time, or commenced misbehavior such as repeatedly printing blank lines.
The front panel of the Data General Eclipse computer has 5 sense switches, 16 address switches, and 5 control switches, as shown (left to right) in the figure at right.
Personal computers replace the function of fixed sense switches with the keyboard and screen user interface.
A typical running application has two modes: either it has nothing to do and awaits some user action, or, some action is in progress that will take a long time to complete. If a program does not regularly test the state of sense switches during a long calculation, they are ineffective at changing the program's operation.
References
[edit]- ^ Rudolf F. Graf Modern dictionary of electronics seventh edition, Newnes, 1999 ISBN 0-7506-9866-7
- ^ See photos in the respective articles
- ^ Backus, John Warner; Beeber, R. J.; Best, Sheldon F.; Goldberg, Richard; Herrick, Harlan L.; Hughes, R. A.; Mitchell, L. B.; Nelson, Robert A.; Nutt, Roy; Sayre, David; Sheridan, Peter B.; Stern, Harold; Ziller, Irving (October 15, 1956). Sayre, David (ed.). The FORTRAN Automatic Coding System for the IBM 704 EDPM: Programmer's Reference Manual (PDF). New York, USA: Applied Science Division and Programming Research Department, International Business Machines Corporation. pp. 2, 19–20. Archived (PDF) from the original on July 4, 2022. Retrieved March 18, 2024. (2+51+1 pages)