NEXCOM NISE 101 User Manual
Page 77

Copyright © 2010 NEXCOM International Co., Ltd. All Rights Reserved.
64
NISE 101 User Manual
Appendix C: Watchdog Timer Setting
call Superio_Set_Reg
pop cx
pop ax
ret
Set_Logic_Device endp
;;---------------------------------------------------
;;---------------------------------------------------
;; Write data to ITE8712 I/O Chip Register
;; Input : CL - register index
;; AL - Value to write
;;---------------------------------------------------
Superio_Set_Reg proc
push ax
mov dx, CONFIG_PORT
mov al,cl
out dx,al
jmp $+2
jmp $+2
pop ax
inc dx
out dx,al
jmp $+2
jmp $+2
ret
Superio_Set_Reg endp
;;---------------------------------------------------
;;---------------------------------------------------
;; Read data from ITE8712 I/O Chip Register
;; Input : CL - register index
;; Output : AL - Value read
;;---------------------------------------------------
Superio_Get_Reg proc Near
mov al, cl
mov dx, CONFIG_PORT
out dx, al
jmp $+2
jmp $+2
inc dx
in al, dx
jmp $+2
jmp $+2
ret
Superio_Get_Reg endp
end watchdog
Demo program 2 (C language):
//====================================================
// Title : NISB101 WatchDog Timer Test Utility
// Date : 02/18/2009
// Compiler : Borland C ++
//====================================================
#include
#include
#include
#include