19
Sample code as below:
IO_Port_Address = 0x4E;
outportb(IO_Port_Address,0x87); //
(EFER)
Extended Functions Enable Register
outportb(IO_Port_Address,0x87);
outportb(IO_Port_Address,0x2D);
// Point to Global Reg.
// Select Multi-Function pin, (Bit0=0 Watchdog Function)
outportb(IO_Port_1,(inportb(IO_Port_1)&0xFE));
outportb(IO_Port_Address,0x07); // Point to Logical Device Number Reg.
outportb(IO_Port_1,0x08); // Select logical device 8, (Watchdog Function)
outportb(IO_Port_Address,0x30); // Device Active register
outportb(IO_Port_1,0x01);
outportb(IO_Port_Address,0xF5); // Select Watchdog count mode seconds or minutes
outportb(IO_Port_1,Format); // Default is second
outportb(IO_Port_Address,0xF6);
// Set Watchdog Timer Value
outportb(IO_Port_1,Time); // 0x00 to disable, max 0xFF