ON POWER

Function

ON POWER allows the programmer to trap and vector program execution if a user presses the power off key.

Syntax

ON POWER GOTO [line no]

or

ON POWER OFF

Examples

ON POWER GOTO 1000

Remarks

This statement causes the OFFVECT locations to be loaded with a vector so that if operation of the power down key is detected, program execution occurs from the line number specified.

Operation of the break key, or a syntax error, will cause the vector to be re-initialised to enable the power on/off switch to function normally.

ON POWER OFF

This statement also re-initialises the OFFVECT location.