Application Examples
LED_STROBE routine
BEGIN
Check state of LED
Set it to the opposite state
Send End of Interrupt (EOI) byte to PIC
Return from ISR
END
INIT_TMR2 Routine
BEGIN
Send Control byte - set for Mode 2 as a Rate Generator
Send low byte of count
Send high byte of count
END
MAIN Program
BEGIN
Initialize the segment registers and stack
Initialize the interrupt vector for the ISR
Call INIT_PIC
Call INIT_TMR2
Enable processor interrupts (already enabled if running
on an STD DOS system)
Go into an idle wait loop, which allows the interrupts
to take care of strobing the LED
END
4-5