??? 01/14/08 10:19 Read: times |
#149423 - OK, to put it another way... Responding to: ???'s previous message |
Jan Waclawek said:
Sorry, Andy, but this is misleading - and exactly in the way people are confused by A vs. ACC. Maybe it is. Originally, I said:
'A' is used when the Accumulator is implicit in the instruction;
'ACC' is the address of the Accumulator when it's used like any other SFR. http://www.8052.com/forum/read.phtml?id=149356 So, 'ACC' is a symbolic name for the SFR address 0xE0 - which is the address of the Accumulator. 'ACC' may be used as an operand to any instruction where an SFR address is permitted (unless specifically excluded). 'A' is not a symbol at all - rather, it should be considered as part of the instruction itself; it is implicit to the instruction. eg, ANL A, Rn chould be thought of as an instruction "ANLA" that takes a single argument - "Rn" as opposed to: ANL direct,#data which is an instruction "ANL" that takes two argunents - "direct" and "#data" So "A" is actually part of the instruction - it cannot be used on its own to specify the Accumulator. However, there is only one accumulator - therefore, whether an instruction accesses it implicitly (because it's an 'A' instruction), or explicitly (by using the "ACC" name, or even the 0xE0 address as a "magic number"), they are all accessing the same thing! Note that some assemblers may use different notations, but the underlying instructions remain the same... |