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

what's the function of "AREGS"and "NOAREGS"

what's the function of "AREGS"and "NOAREGS", can you provide me some sample, so that I could understand them clear. Are them still useful in current updated versions.
In the manual it is said that with "NOAREGS" the function could be called by another functions using different register bank.

#pragma NOAREGS
char add(char i)
{
    return i+10;
}

void main(void) using 1
{
    ch = add(3);
}

whether I enable or disable #pragma NOAREGS
I always get the right result. If with "NOAREGS" the function could be called by another functions using different register bank, then does it also mean that with "AREGS" the function could not be called by another functions using different register bank. I am very confused with "AREGS"and "NOAREGS".

0