NAR-5050/5070 Series User
’
s Manual
36
;Get_GPI Step 3 : Get GPI_Bits
; Bit7 of Ch start ------------------------------
; GPIO30 : JP1 of test module
; EBX_Bit[31..24] : GPDI3 = 09h,
; EBX_Bit[23..16] : MASK bit ( which bit ) , GPIO30 --> 00h
; 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# = 30h
; Call LOOP_GET_GPI_CARRY , get the bit to CARRY flag.
mov bl,30h ; EBX_Bit[7..0] = 30h
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,00h ; 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_bit7 ; if carry , then Bit7=1
and ch,7fh ; else Bit7=0
jmp next_bit6
set_bit7 :
or Ch,80h
next_bit6 :
; Bit7 of Ch end ---------------------------------
; Bit6 of Ch start ------------------------------
; GPIO37 : JP2 of test module
; EBX_Bit[31..24] : GPDI3 = 09h,
; EBX_Bit[23..16] : MASK bit ( which bit ) , GPIO37 --> 07h
; 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# = 37h
; Call LOOP_GET_GPI_CARRY , get the bit to CARRY flag.
;
mov bl,37h ; EBX_Bit[7..0] = 37h
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]