NAR-5050/5070 Series User
’
s Manual
41
mov bh,al ; EBX_Bit[15..8]
ror ebx,10h ; Swap EBX high and low word
mov bl,04h ; EBX_Bit[23..16]
mov bh,GPDI3 ; EBX_Bit[31..24]
rol ebx,10h ; Restore the Swap of EBX high and low word
call LOOP_GET_GPI_CARRY ; call get GPDI
jc set_bit0 ; if carry , then Bit0=1
and ch,0FEh ; else Bit0=0
jmp all_8bits_read
set_bit0 :
or Ch,01h
all_8bits_read :
; 8 GPI bits read and kept in CH and CH will be returned
; Bit0 of Ch end ---------------------------------
pop ax
pop ebx
pop edx
ret
GET_GPI_STATUS_CH ENDP
;-----------------------------------------------------------------------;
; LOOP_GET_GPI_CARRY ;
;-----------------------------------------------------------------------;
; ;
; GET the GPI pin status and returned to Carry Flag ;
; ;
; INPUT : ;
; EBX_Bit[31..24] : GPDI Offset value , ;
; EBX_Bit[23..16] : MASK bit ( which bit ) ;
; EBX_Bit[15..8] : GPCFG1(LDN07_Index_F1h) Data ;
; EBX_Bit[7..0] : GPSEL (LDN07_Index_F0h) Data , Port# and Pin# ;
; STACK PRESENT ;
; EDX_Bit[31..16] : GPIO I/O Base Address ;
; ;
; OUTPUT : Carry , GPI pin status saved to carry flag and returned ;
; ;
; Modified Register : DX , AX , ;
; ;
;-----------------------------------------------------------------------;