#include sbit SW = P1^7; sbit IND = P1^0; sbit WAVE = P2^5; void timer0(void) interrupt 1 { WAVE = ~WAVE; } void main() { SW = 1; TMOD = 0x02; TH0 = 0xA4; IE = 0x82; while(1) { IND = SW; } }