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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/01/09 11:21
Read: times


 
#169332 - tried it
Responding to: ???'s previous message
Yes, I tried it. What I found out was that after it came to the correct

Here's the original:
AHUNDS:
  MOV A, R0
  FZERO:
	CJNE A, #0, FONE
	MOV R3, #ZERO
  FONE:
    CJNE A, #1, FTWO
	MOV R3, #ONE
  FTWO:
	MOV R3, #TWO

RET

 


oaky, let's say it goes into FZERO, and matches #0. it does the next instruction (MOV R3, #ZERO), and then goes to (FONE). since it doesn;t match, it proceeds to (FTWO), where R3 -which originally had #ZERO- gets overwritten by #TWO.

Did I get it right?

So that's why it's important to do a RET right after R3 is written so it won't be rewritten by the last value.

Tell me if my explanation was wrong. Thanks for the idea, by the way.

Regards,
JR

List of 28 messages in thread
TopicAuthorDate
TEMPERATURE MONITORING DEVICE USING AT89C51            01/01/70 00:00      
   Divide your problem into parts            01/01/70 00:00      
      ADC is working fine            01/01/70 00:00      
   29.9 is what you implemented            01/01/70 00:00      
      I don't get it.            01/01/70 00:00      
         OR this way also            01/01/70 00:00      
         Did you try?            01/01/70 00:00      
            Debugging techniques            01/01/70 00:00      
            tried it            01/01/70 00:00      
   Test your Display routines using DIP switches            01/01/70 00:00      
   Excellent question            01/01/70 00:00      
      agreed, but one thing missing            01/01/70 00:00      
         8 data lines for 7-seg            01/01/70 00:00      
            I see no con2 connections on your schematic and ...            01/01/70 00:00      
               also            01/01/70 00:00      
               CON2 is good.            01/01/70 00:00      
         7 segments, plus DP            01/01/70 00:00      
            the 8 data lines are each segment + dot            01/01/70 00:00      
      Thank you            01/01/70 00:00      
   Look at your code            01/01/70 00:00      
      You're right            01/01/70 00:00      
         First try to solve the simplest things like DELAY            01/01/70 00:00      
   Problem Solved!            01/01/70 00:00      
      We ought to have this as an example of a well-framed query!            01/01/70 00:00      
         Absolutely            01/01/70 00:00      
            Fix the FAQs?            01/01/70 00:00      
            agreed, but there is one fly in the ointment            01/01/70 00:00      
               it's not a big fly            01/01/70 00:00      

Back to Subject List