Sense switch

From Infogalactic: the planetary knowledge core
Jump to: navigation, search
Sense switches on a Data General Eclipse S/130, lower left

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
Data General Eclipse 5
IBM 7090 6
IBM 1620 4
PDP-1 6

On the IBM 1620 there were four switches, and their state could be tested via special forms of the IF-statement offered by the FORTRAN compiler for the IBM 1620. For the IBM 1130 there were 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 were 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 could 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 had 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 had 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 did not regularly test the state of sense switches during a long calculation, they would be ineffective at changing the program's operation.

References

  1. Rudolf F. Graf Modern dictionary of electronics seventh edition, Newnes, 1999 ISBN 0-7506-9866-7


<templatestyles src="Asbox/styles.css"></templatestyles>