Skip to main content
Renesas Electronics America - Knowledgebase

Using the argument of an inline assembler function (CC-RL)

Last Updated:05/10/2017


I am using RL78 Compiler CC-RL.
When I specify a variable name for the argument of an inline assembler function defined by #pragma inline_asm, can I use the variable name in the assembler?


No, such variable names cannot be used.

The arguments of inline assembler functions defined by #pragma inline_asm must be passed from the calling function as described in the rule of “Passing arguments” in the CC-RL User's Manual.

Names specified for arguments cannot be used, but you can use the value of passing registers or stacks in accordance with the preceding rule.

[ Example ]
#pragma inline_asm asmfunction
void asmfunction(unsigned char Data)


The preceding program has one argument in unsigned char type and a value is stored in the A register of the general-purpose register. Use the value of the A register to create a program by the assembler.

Suitable Products
e² studio
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family