NAR-5050/5070 Series User
’
s Manual
52
mov bh,GPDO3 ; EBX_Bit[31..24]
rol ebx,10h ; Restore the Swap of EBX high and low word
call LOOP_GPO_BITS ; call output GPDO
; Bit0 of Ch end ---------------------------------
pop cx
pop ax
pop ebx
pop edx
ret
GPO_OUT_BYTE_DH ENDP
;-----------------------------------------------------------------------;
; LOOP_GPO_BITS ;
;-----------------------------------------------------------------------;
; ;
; OUTPUT the GPDO value ;
; ;
; INPUT : ;
; EBX_Bit[31..24] : GPDO Offset value , ;
; EBX_Bit[23..16] : GPO Data ;
; EBX_Bit[15..8] : GPCFG1(LDN07_Index_F1h) Data ;
; EBX_Bit[7..0] : GPSEL (LDN07_Index_F0h) Data , Port# and Pin# ;
; EDX_Bit[31..16] : GPIO I/O Base Address ;
; STACK PRESENT ;
; ;
; OUTPUT : None ;
; ;
; Modified Register : DX , AX , ;
; ;
;-----------------------------------------------------------------------;
LOOP_GPO_BITS PROC NEAR
mov dx,Index_IO_Port ; Program GPSEL first ( port# and Pin# )
mov al,GPSEL
out dx,al
mov dx,Data_IO_Port
mov al,bl ;
out dx,al
mov dx,Index_IO_Port ; Program GPCFG1 ( port dir. type,..)
mov al,GPCFG1
out dx,al
mov dx,Data_IO_Port
mov al,bh ;
out dx,al