NAR-5050/5070 Series User
’
s Manual
38
; Bit4 of Ch start ------------------------------
; GPIO36 : JP4 of test module
; EBX_Bit[31..24] : GPDI3 = 09h,
; EBX_Bit[23..16] : MASK bit ( which bit ) , GPIO26 --> 06h
; EBX_Bit[15..8] : GPCFG1(LDN07_Index_F1h) Data = ( read value ) or 06h
; EBX_Bit[7..0] : GPSEL (LDN07_Index_F0h) Data , Port# and Pin# = 36h
; Call LOOP_GET_GPI_CARRY , get the bit to CARRY flag.
mov bl,36h ; EBX_Bit[7..0] = 36h
mov dx,Index_IO_Port ; Read Index F1h first
mov al,GPCFG1
out dx,al
mov dx,Data_IO_Port
in al,dx
or al,06h ; OR 06h
mov bh,al ; EBX_Bit[15..8]
ror ebx,10h ; Swap EBX high and low word
mov bl,06h ; 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_bit4 ; if carry , then Bit4=1
and ch,0EFh ; else Bit4=0
jmp next_bit3
set_bit4 :
or Ch,10h
next_bit3 :
; Bit4 of Ch end ---------------------------------
; Bit3 of Ch start ------------------------------
; GPIO32 : JP5 of test module
; EBX_Bit[31..24] : GPDI3 = 09h,
; EBX_Bit[23..16] : MASK bit ( which bit ) , GPIO32 --> 02h
; EBX_Bit[15..8] : GPCFG1(LDN07_Index_F1h) Data = ( read value ) or 06h
; EBX_Bit[7..0] : GPSEL (LDN07_Index_F0h) Data , Port# and Pin# = 32h
; Call LOOP_GET_GPI_CARRY , get the bit to CARRY flag.
mov bl,32h ; EBX_Bit[7..0] = 32h
mov dx,Index_IO_Port ; Read Index F1h first
mov al,GPCFG1
out dx,al
mov dx,Data_IO_Port
in al,dx
or al,06h ; OR 06h
mov bh,al ; EBX_Bit[15..8]