User`s manual

AIMB-740-B/741-B User’s Manual 142
NEWIODELAY
mov dx, SMBus_Port + 02h
mov al, 48h
out dx, al
NEWIODELAY
NEWIODELAY
mov cx, 100h
@@:
NEWIODELAY
loop short @B
call Chk_SMBus_Ready
popa
ret
I2CWriteByte Endp
Chk_SMBus_ReadyProcNear
pusha
mov dx, SMBus_Port + 0 ; status port
Chk_I2C_OK:
in al, dx ; get status
NEWIODELAY
out dx, al ; clear status
NEWIODELAY
test al, 02h ; termination of command
jnz short Clear_final
and al, NOT 40h ; mask INUSEbit
or al, al ; status OK ?
jz short Clear_final
test al, 04h ; device error