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

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

    read "the bible"
    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

    Read the datasheet
    5. can we use PUSH and POP command with any register or there are some speciific register with which it works.
    read "the bible"

    The induvidual addresses of chapters 1, 2 and 3 of "the bible" can be found at
    http://www.8052.com/links.phtml

    The rest is just datasheets of outdated derivatives and a VERY long download.

    Erik

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

  • 1. what is the difference between symbol A and ACC used for accumulator.
    A1. The header file eg. REGS51.h has those special function register definitions and addresses. for example Regs51.h has sfr ACC = 0xE0; Now you can change that to just sfr A = 0XE0; if you want to, but then you would have a none statndard Regs file.
    2. when i use (in assembly)PUSH A, i get error. PUSH ACC does not give me error.
    A2. SEE A1 above
    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
    Aa1. Stack pointer Max
    b. Auxr_1
    Aa2. Auxilliary reg 1 . See data sheet SFR definitions. This is a now 8051 standard sfr.
    c. states
    Ac1. States are the calculacalated at 6 states per 12 instruction cycles. This is part of the timing for instructions.
    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.
    A4. Declare all SFR's in REGs51.h

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

    8051 ASM Instructions Push instruction allows you top push any "directly addressable" SFr onto the stack

    Thanks for help