This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

definition of terminologies

1. what is the difference between symbol A and ACC used for accumulator.
2. when i use (in assembly)PUSH A, i get error. PUSH ACC does not give me error.
3. in the debug environment i do not understand what does following register do or what does it stand for. pl explain it to me.
a. Sp_max
b. Auxr_1
c. states
4. when i used " SRF p0= 0x08" inside main function i get error. when i declare it globally its okay. is this the restriction that declaration with sfr must be outside the main.

5. can we use PUSH and POP command with any register or there are some speciific register with which it works.

Thanks for help

Parents
  • In 8051 assembly language, the difference between A and ACC is that A is the implied address of the accumulator whereas ACC is the direct address of the accumulator.

    The potential for confusion arises because the design of the 8051 gives many registers a direct address.

    Where an address is implied, it is embedded in the opcode of an instruction. For example:

            MOV     A,@R0
    
    This requires just one byte of object code - it is an instruction in which both the source and the destination are implied.

    Whereas:
            MOV     B,@R0
    
    Requires two bytes, the destination (B) is simply a direct address just like any other address in internal RAM.

    The PUSH instruction has only one addressing mode: direct. So, it is necessary to provide a direct address. This is why PUSH ACC works and PUSH A does not.

Reply
  • In 8051 assembly language, the difference between A and ACC is that A is the implied address of the accumulator whereas ACC is the direct address of the accumulator.

    The potential for confusion arises because the design of the 8051 gives many registers a direct address.

    Where an address is implied, it is embedded in the opcode of an instruction. For example:

            MOV     A,@R0
    
    This requires just one byte of object code - it is an instruction in which both the source and the destination are implied.

    Whereas:
            MOV     B,@R0
    
    Requires two bytes, the destination (B) is simply a direct address just like any other address in internal RAM.

    The PUSH instruction has only one addressing mode: direct. So, it is necessary to provide a direct address. This is why PUSH ACC works and PUSH A does not.

Children
No data