??? 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. |