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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/07/07 15:40
Read: times


 
#134502 - Ooooh, another '51 pitfall...
Responding to: ???'s previous message
You are falling consistently into the pits of the peculiarities of '51 design...

http://www.8052.com/faqs.phtml?FAQ=119918
http://www.8052.com/faqs.phtml?FAQ=129167
http://www.8052.com/forum/thr...ead=127742


You cannot PUSH A... A is NOT a register, it's best viewed as a part of certain instructions (e.g. ORL A,#123). In these instructions, a register is changed, which can be accessed in the SFR area as ACC...

Shortly, you cannot PUSH A/POP A, but you need to PUSH ACC/POP ACC.

JW

PS. As I told you above, you will also want to PUSH PSW/POP PSW.

There is a trick to avoid the latter in this particular case, but I will not tell it here, so that you learn the safe and longer way rather than the dirty tricks.



List of 59 messages in thread
TopicAuthorDate
is AT89C51 can support Auto Address Rec: feature ?            01/01/70 00:00      
   IF they aren't there, it doesn't do it!            01/01/70 00:00      
      why the automatic address recognition?            01/01/70 00:00      
         Every little helps!            01/01/70 00:00      
            let's calculate a bit            01/01/70 00:00      
               an often forgotten fact            01/01/70 00:00      
                  certainly            01/01/70 00:00      
                     let me try            01/01/70 00:00      
                        this sounds like....            01/01/70 00:00      
                           As I said, it is not easy to find an example thst            01/01/70 00:00      
                              if it\'s not easy to find an example...            01/01/70 00:00      
      WHO told you that you HAVE to use a derivative t            01/01/70 00:00      
         Well ofcourse i am not going to design 100000            01/01/70 00:00      
            I will help you, but not write your code            01/01/70 00:00      
               Well thanks Erik            01/01/70 00:00      
               well sir if i write a code then could you check it            01/01/70 00:00      
                  sure            01/01/70 00:00      
                     well sir its this ...            01/01/70 00:00      
                        you can't do this            01/01/70 00:00      
                           well instead of Rx            01/01/70 00:00      
                        On Comments            01/01/70 00:00      
                           So Sorry for my Mistake            01/01/70 00:00      
                              stop accusing yourself            01/01/70 00:00      
                                 Well sir its Honor for me :-)            01/01/70 00:00      
                           The Right one here goes            01/01/70 00:00      
                              I think you made the wrong change            01/01/70 00:00      
                              this will (almost) work if you only have one data            01/01/70 00:00      
                                 Well sir Eric i think you are Talking about it....            01/01/70 00:00      
                                    not yet            01/01/70 00:00      
                                    Ooooh, another '51 pitfall...            01/01/70 00:00      
                                       Hows That ?            01/01/70 00:00      
                                          still not good...            01/01/70 00:00      
                                    I just noticed            01/01/70 00:00      
                                       as I said            01/01/70 00:00      
                                          Ah i am not in Hurry....            01/01/70 00:00      
                                             still not good II.            01/01/70 00:00      
                                                I have did it... you can see it i have Edited it .            01/01/70 00:00      
                                             ok, look at line 4            01/01/70 00:00      
                                                Simple,like if Address not match then GO_ON            01/01/70 00:00      
                                                   WHAT is in 'b'?            01/01/70 00:00      
                                                      I have finally got it.....            01/01/70 00:00      
                                                         now add the PUSH/POP PSW...            01/01/70 00:00      
                                                            Well i think that Pushing PSW is not neccesary ..            01/01/70 00:00      
                                                               better this than be sorry....            01/01/70 00:00      
                                                               it is            01/01/70 00:00      
                                                                  Sir you are right that carry is effected...            01/01/70 00:00      
                                                                     avoid common pitfalls            01/01/70 00:00      
                                                                     famous last words            01/01/70 00:00      
                                                                        Well sir i will never forget the carry is changed.            01/01/70 00:00      
                                                                           RTFM            01/01/70 00:00      
                                                                        Well sir How to save the Carry ??            01/01/70 00:00      
                                                                           see http://www.8052.com/forum/read.phtml?id=134583            01/01/70 00:00      
                                                                              Well sir i will see this later...            01/01/70 00:00      
                                                                                 so, that is the reason for the hurry            01/01/70 00:00      
         No compulsion!            01/01/70 00:00      
   Oops its Erik not Eric (Proc: For Multiple Data)            01/01/70 00:00      
      stop hurrying            01/01/70 00:00      
   It just hit me - you can't            01/01/70 00:00      
   Well sir i have give up ... means no computer...            01/01/70 00:00      

Back to Subject List