A hardware and software controlled on/off circuit for computers is
provided. The on/off circuit comprises a control circuit which produces
first and second signals, wherein the first signal causes the computer to
execute a software program which prepares the computer for power removal
and which returns a third signal to the circuit when the software program
has prepared the computer for power removal, and wherein the circuit
produces the second signal to disconnect the power supply in response to
the third signal. If for some reason the software program should "lock-up"
the computer, the on/off circuit and provides the second signal to
disconnect the power supply if the software program has not sent the third
signal after a predetermined time from when the control circuit sent the
first signal to the software program so that the computer may be shut
down.