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
Will the direction #pragma REGISTERBANK(x) apply only for the function that follows this statement, or will it apply untill a new REGISTERBANK direction will be stated ? In the following example:
#pragma REGISTERBANK(3) void func1 (void) { ... ... } void func2 (void) { ... ... }
See: http://www.keil.com/support/man/docs/c51/c51_registerbank.htm (The REGISTERBANK directive selects which register bank to use for subsequent functions).