#include #define CLOCK_INT 0x01C static void (interrupt * (CLOCK_VAL))(); static char far *p = (char far *) 0xB8000000L; static unsigned int counter = 0; static int sleeptime = 100; void whatever(void); void interrupt isr(void) { (*p)++; if (counter++ >= sleeptime) { counter = 0; (*p) = '*'; disable(); setvect(CLOCK_INT, CLOCK_VAL); /* Restore it */ enable(); /* whatever(); */ } } void main(void) { CLOCK_VAL = getvect(CLOCK_INT); /* Memorize it */ disable(); setvect(CLOCK_INT, isr); /* Change it */ enable(); keep(0, 600); }