Application Examples
INIT Routine
BEGIN
Initialize the NMI routine pointer
Initialize the segment registers
Initialize the software data
Initialize the hardware, ie. the 8259A
Programmable Interrupt Controller and
one of the 8254 Timers to be used as
the watchdog timer (use mode 4)
Trigger the watchdog timer
Return
END
NON-MASKABLE INTERRUPT Service Routine
BEGIN
Trigger the Watchdog Timer
Check for the cause of the NMI at the
8259A Interrupt Request register, bit 5
If set to 1,
A power-fail interrupt has occurred
Save the segment and scratchpad registers
into battery-backed RAM
Save the stack registers into battery-backed
RAM
Save critical data into battery-backed RAM
Set the "System Data Saved" flag
Is the power-fail interrupt due to low system battery supply?
4-32