NAR-7070 User’s Manual
62
mov bl,GP_LVL_OFFSET ; Write GPO19 1
mov dx,cx ;
add dx,bx ;
add dx,02h ; point to GPIO[16..23] register
in al,dx ; read first
call IODELAY ; io delay
or al,08h ;
out dx,al ; output GPO19 1 first
call FIXDELAY ; 30 us delay
in al,dx ; output GPO19 0 then
call IODELAY
and al,0F7h
out dx,al
call FIXDELAY ; 30 us delay
in al,dx ; output GPO19 high finally
call IODELAY
or al,08h
out dx,al
; ========= Write GPO19 1-0-1 end
call READ_GPI6_TO_AL ; check RST2DF F/F
and al,40h ; mask Bit6
cmp al,00h
je test_end ; okay , then end
; jz test_end ; okay , then end
; no , error message display
lea dx,promp_err3
mov ah,09h
int 21h
ror edx,10h ; error falg EDX_Bit18 , 1 --> Error happened
or dl,04h
rol edx,10h
; ---- t3 end
test_end :
ror edx,10h ; check error flag
cmp dl,00h
je test_ok
test_fail :
lea dx,PROMP_2_CR_LF
mov ah,09h
int 21h
lea dx,promp_TEST_fail
mov ah,09h
int 21h