WSB-G41A CPU CardPage 130E.1 IntroductionThe digital I/O is used for machine control and automation.E.2 DIO Connector PinoutsLocated in the Connectors section of this document.E.3 Assembly Language Example;**************************************************; DIO Port: 0A21h[3:0] (4 Out); 0A22h[3:0] (4 In);**************************************************;==================================================; Get current input and output values into AL register; AL: bit0~bit3 as output value; bit4~bit7 as Input value;==================================================mov dx, 0A21h ; GPIO output I/O base addressin al, dx ; Get output statusjmp $+2 ; Waitjmp $+2 ; Waitand al, 0Fhmov bl, al ; Move al to bl temporarilyinc dx ; sets dx to 0A22hin al, dx ; Get input statusjmp $+2 ; Waitjmp $+2 ; Waitand al, 0Fhrol al, 4 ; Shift input values overor al, bl ; Merge all results into AL; AL: bit0~bit3 as output value; bit4~bit7 as input value;==================================================; Output value (x) to GPIO; AL: bit0~bit3 as output value;==================================================mov al, 0xh ; x is the output value (0 ~ Fh)mov dx, 0A21h ; GPIO output I/O base addressout dx, al ; bit0 ~ bit3 as Output value; bit4 ~ bit7 are Reserved