SPRAC71B February 2019 – October 2023
The 32-bit ACC register (AH:AL) is used to pass
long
arguments.
Example:
C source code:
void func1(int a0, long a1, int a2);
int a0, a2;
long a1;
func2(void)
{
func1(a0, a1, a2);
}
Compiled assembly code:
MOVW DP,#a0
MOVZ AR4,@a0
MOVL ACC,@a1
MOVZ AR5,@a2
The 64-bit ACC:P register pair is used to pass
long long
arguments.
Example:
C source code:
void func1(long long a0);
long long a0;
func2(void)
{
func1(a0);
}
Compiled assembly code:
MOVW DP,#a0
MOVL P,@a0
MOVL ACC,@a0+2