[an error occurred while processing this directive]
|
;==================================================Думаю, разберетесь.
; Проверка выходовTestOut: mov r0, #on1h ;
mov r1, #off1h ;
acall Test ;
jz TO_01 ;if on > off
mov r0, #off1h
mov r1, #rHour
acall Test
jnz Out1_Off ;if off < real
mov r0, #on1h
mov r1, #rHour
acall Test
jnz Out1_On ;if on < real
Out1_Off: setb IND1
setb OUT1
sjmp TestOut2
Out1_On: clr IND1
clr OUT1
sjmp TestOut2TO_01: mov r0, #off1h
mov r1, #rHour
acall Test
jz Out1_On ;if off > real
mov r0, #on1h
mov r1, #rHour
acall Test
jz Out1_Off ;if on > real
sjmp Out1_On
TestOut2: mov r0, #on2h ;
mov r1, #off2h ;
acall Test ;
jz TO_02 ;if on > off
mov r0, #off2h
mov r1, #rHour
acall Test
jnz Out2_Off ;if off > real
mov r0, #on2h
mov r1, #rHour
acall Test
jnz Out2_On ;if on > real
Out2_Off: setb IND2
setb OUT2
ret
Out2_On: clr IND2
clr OUT2
retTO_02: mov r0, #off2h
mov r1, #rHour
acall Test
jz Out2_On ;if off > real
mov r0, #on2h
mov r1, #rHour
acall Test
jz Out2_Off ;if on > real
sjmp Out2_OnTest: mov a, @r0
clr c
subb a, @r1
jz TestLow
jnc TestOk
sjmp TestFail
TestLow: inc r0
inc r1
mov a, @r0
clr c
subb a, @r1
jz TestFail
jc TestFail
TestOk: clr a
ret
TestFail: mov a, #01h
ret
E-mail: info@telesys.ru