GPO_0 equ 00000010b
GPO_1 equ 00000100b
GPO_2 equ 01000000b
GPO_3 equ 10000000b
Sample Code:
#1 : Get GPI 0 status
; Get GPI 0/1/2/3 Pin Status Register
mov dx, 50Ch
in eax, dx
;eax bit24 = GPI 0 status
;eax bit26 = GPI 1 status
;eax bit27 = GPI 2 status
;eax bit28 = GPI 3 status
#2 : Set GPO 0/1/2/3 status to high
; Set GPO 0/1/2/3 Status to high(1).
mov dx, 538h
in eax, dx
or eax, GPO_0 + GPO_1 + GPO_2 + GPO_3
out dx,eax