Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/28/04 04:25
Read: times


 
#78223 - RE: Does your code work with LCALLs?
Responding to: ???'s previous message
HELLO KAI.


ACALL and LCALL do not work here.
and i don t kow why.
only (one) ACALL or LCALL work in the loop

"Simulated" all examples works ok.
writed in an AT89C51 the example 04 fail.


this example work well:

EXAMPLE - 01
org 0000h

loop:
clr p2.0
acall delay1
setb p2.0
acall delay1
sjmp loop

delay1:
mov 30h,#255
mov 31h,#255

time1:
djnz 30h,time1
djnz 31h,time1
ret

end

;*********************************************


EXAMPLE - 02


this example work well:
org 0000h

loop:
clr p2.0
acall delay1
setb p2.0
acall delay2
sjmp loop

delay1:
mov 30h,#255
mov 31h,#255

time1:
djnz 30h,time1
djnz 31h,time1
sjmp commom_return




delay2:
mov 30h,#255
mov 31h,#255
time2:
djnz 30h,time2
djnz 31h,time2
sjmp commom_return


commom_return:;only (one)RET for delay1 and delay2

ret

end

;*********************************************




EXAMPLE - 03 no ACALL or LCALL, only (SJMP).


this example work well:
org 0000h

loop:
clr p2.0
sjmp delay1
a1:
setb p2.0
sjmp delay2
a2:
sjmp loop

delay1:
mov 30h,#255
mov 31h,#255

time1:
djnz 30h,time1
djnz 31h,time1
sjmp a1




delay2:
mov 30h,#255
mov 31h,#255
time2:
djnz 30h,time2
djnz 31h,time2
sjmp a2
end

;****************************************************

This code no not work.


EXAMPLE - 04



org 0000h

loop:
clr p2.0
acall delay1
setb p2.0
acall delay2
sjmp loop

delay1:
mov 30h,#255
mov 31h,#255

time1:
djnz 30h,time1
djnz 31h,time1
ret




delay2:
mov 30h,#255
mov 31h,#255
time2:
djnz 30h,time2
djnz 31h,time2
ret
end


;******************************************

Thank you

Afranio.S


List of 30 messages in thread
TopicAuthorDate
why my ACALL do not work??            01/01/70 00:00      
   RE: why my ACALL do not work??            01/01/70 00:00      
      RE: why my ACALL do not work??            01/01/70 00:00      
      RE: why my ACALL do not work??            01/01/70 00:00      
         RE: why my ACALL do not work??            01/01/70 00:00      
   Maybe this will work....            01/01/70 00:00      
      RE: now my ACALL is working.why?            01/01/70 00:00      
         It works fine            01/01/70 00:00      
            RE: It works fine            01/01/70 00:00      
         RE: now my ACALL is working.why?            01/01/70 00:00      
            RE: now my ACALL is working.why?            01/01/70 00:00      
               RE: now my ACALL is working.why?            01/01/70 00:00      
               RE: now my ACALL is working.why?            01/01/70 00:00      
                  RE: now my ACALL is working.why?            01/01/70 00:00      
                     RE: now my ACALL is working.why?            01/01/70 00:00      
                  RE: now my ACALL is working.why?            01/01/70 00:00      
                     RE: now my ACALL is working.why?            01/01/70 00:00      
                        RE: now my ACALL is working.why?            01/01/70 00:00      
                           RE: now my ACALL is working.why?            01/01/70 00:00      
                     RE: now my ACALL is working.why?            01/01/70 00:00      
               RE: now my ACALL is working.why?            01/01/70 00:00      
            RE: now my ACALL is working.why?            01/01/70 00:00      
   RE: why my ACALL do not work??            01/01/70 00:00      
      RE: why my ACALL do not work??            01/01/70 00:00      
   RE: why my ACALL do not work??            01/01/70 00:00      
   RE: why my ACALL do not work??            01/01/70 00:00      
   Paging Mr Afranio...            01/01/70 00:00      
      RE: Paging Mr Afranio...            01/01/70 00:00      
         Does your code work with LCALLs?            01/01/70 00:00      
            RE: Does your code work with LCALLs?            01/01/70 00:00      

Back to Subject List