beautypg.com

NEXCOM NISE 101 User Manual

Page 76

background image

Copyright © 2010 NEXCOM International Co., Ltd. All Rights Reserved.

63

NISE 101 User Manual

Appendix C: Watchdog Timer Setting

or al, 040h ;; bit6=1 enable, bit6=0 disable
call Superio_Set_Reg ;; KRST as WDT output pin

;; Watchdog Timer time-out value select (72H,Bit7) 1 = second, 0 = minute
mov cl, 072h ;; Register 72h
call Superio_Get_Reg
or al, 080h ;; bit7=1 second, bit7=0 minute
call Superio_Set_Reg ;; Set to second mode

;; Set Watchdog Timer Time-out value = 0AH (10 seconds)
mov cl, 073h ;; Register 73H
mov al, 0Ah ;; 01h ~ FFh == 01 ~ 255 seconds
call Superio_Set_Reg

call Exit_Config_Mode ;; Exit SuperIO Chip config mode

mov ah,4ch ;; Retuen to DOS
int 21h
ret
WatchDog ENDP
;;---------------------------------------------------

;;---------------------------------------------------
;; Enter ITE8712 I/O Chip Config mode
;;---------------------------------------------------
Enter_Config_Mode Proc
mov si, offset cs:UNLOCK_KEY
mov dx, CONFIG_PORT
mov cx, 4
@@:
mov al, byte ptr cs:[si]

out dx, al
inc si
loop short @B
ret
Enter_Config_Mode Endp

;;---------------------------------------------------
;; exit ITE8712 I/O Chip config mode
;;---------------------------------------------------
Exit_Config_Mode Proc
mov dx, CONFIG_PORT
mov al, LOCK_KEY
out dx, al
jmp $+2
jmp $+2
inc dx
mov al, LOCK_KEY
out dx, al
ret
Exit_Config_Mode Endp
;;---------------------------------------------------

;;---------------------------------------------------
;; Select ITE8712 I/O Chip Logic Device
;;Input : CL - logic device to set
;;---------------------------------------------------
Set_Logic_Device proc
push ax
push cx
xchg al,cl
mov cl,07h