I get an assemble error when I try to PUSH/POP the accumulator. Why?
Submitted By: Craig Steiner FAQ Last Modified: 02/15/08
- A common error is to code "PUSH A" and "POP A". Both of these are incorrect. "A" refers to the accumulator internally within a command, as in "RL A". In that case, the "A" is an integral part of the opcode itself. PUSH and POP must refer to either an SFR address or Internal RAM address. When the accumulator is referred to as an SFR, it must be referred to as "ACC". In the case of this error, change your code to "PUSH ACC" and/or "POP ACC".
Push/Pop A
Submitted By: Jon Ledbetter FAQ Last Modified: 02/15/08
- Dunfield Development Systems ASM51 does allow the use of
Push A
Pop A
However, one should stick to the standard notation of
Push ACC
Pop ACC
so that migrating to a different assembler is easier.
Add Information to this FAQ: If you have additional information or alternative solutions to this question, you may add to this FAQ by clicking here.