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

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

Children
No data