Hello, I'm having trouble understanding the NOAREG, AREG & USING options. I'm also confused with R0-R7 & AR0-AR7. I've read the support files and manual but i'm still confused. May I know a) How is it that using NOAREGs will allow me to disregard register bank currently used when writing function? ( will the registers be automatically saved to stack? ) b) What is the difference with R0 and AR0? How does the USING option affect R0 & AR0? (for example if i put the option "USING 2", have then use R4, does this mean that it is the actually R20 ie in bank 2, whiel AR4 is not affected by the using function) c) How does USING help me to save stack space? Best Regards, AL
"I've read the support files and manual" Which product? Which manual? The following is from the section entitled "Special Assembler Symbols" in the Macro Assembler and Utilities Manual: R0 – R7 The eight 8-bit general purpose 8051 registers in the currently active register bank. A Maximum of four register banks are available. AR0 – AR7 Represent the absolute data addresses of R0 through R7 in the current register bank. The absolute address for these registers will change depending on the register bank that is currently selected. These symbols are only available when the USING directive is given. Refer to the USING directive for more information on selecting the register bank. These representations are suppressed by the NOAREGS directive. Refer to the NOAREGS directive for more information.