English
Language : 

CC78K4 Datasheet, PDF (396/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
Multiplication Function
#pragma mul
• Declare the use of functions for multiplication with the #pragma mul directive of the module.
However, the following items can be described before #pragma mul.
• Comments
• Other #pragma directives
• Preprocessing directives that neither define nor reference variables or functions.
• Keywords following #pragma can be described in either uppercase or lowercase letters.
RESTRICTIONS
• Multiplication functions are handled as ordinary function if the target device does not have multiplication
instructions.
• The function names for multiplication cannot be used as the function names (when #pragma mul is declared).
• The functions for multiplication must be described in lowercase letters. If they are described in uppercase
letters, they are handled as ordinary function.
EXAMPLE
(C source)
#pragma mul
unsigned char a = 0x11;
unsigned char b = 2;
unsigned int I;
void main()
{
i = mulu(a, b);
}
(Output object of compiler)
_main:
mov
mov
mulu
movw
ret
a,!!_b
b,!!_a
b
!!_i,ax
396
User’s Manual U15556EJ1V0UM