Specifications

Appendix B: Programming the Watchdog Timer
Page A7
BB
flags = enablespace();
refreshtimer();
setconfigurationregister(SMOUTCTRL,
(unsigned char)(getconfigurationregister(SMOUTCTRL) &
(unsigned char)~1));
disablespace(flags);
_dos_setvect(TIMERINT,newfunction);
_enable();
}
void
deinstalltimer()
{
unsigned short flags;
flags = enablespace();
setconfigurationregister(SMOUTCTRL,
(unsigned char) (getconfigurationregister(SMOUTCTRL) | 1));
_dos_setvect(TIMERINT,previoustimerfunction);
disablespace(flags);
}
main(int argc, char **argv)
{
unsigned short flags;
installtimer(mytimer);
/*
// Application code goes here ...
*/
deinstalltimer();
}
For more details see the Intel 8254 specification and the Intel 386 SL Microprocessor
Superset Programmer's Reference Manual.