User`s manual

137 Appendix C
push cx
call Get_GPIO_Info
mov cl, bl
add cl, Control_Reg
call I2CReadByte
push bx
mov cl, bl
add cl, Control_Reg
not bh
and al, bh
call I2CWriteByte
pop bx
mov cl, bl
add cl, Input_Reg
call I2CReadByte
test al, bh
jnz GPI_High
xor al, al
jmp Get_End
GPI_High:
mov al, 1
Get_End:
pop cx
pop bx
pop dx
ret
Get_GPI_StatusEndp
;[]==========================================================[]
;Input : AL - GPIO number
; For example, AL is 20 if use GPIO 20
; AH - 1 = High
; 0 = Low