|
CC78K0S Datasheet, PDF (386/520 Pages) NEC – C Compiler Ver.1.30 or Later Language | |||
|
◁ |
CHAPTER 11 EXTENDED FUNCTIONS
Multiplication Function
#pragma mul
RESTRICTIONS
⢠Multiplication functions are not expanded but are called by the library.
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)
mov a,!_b
mov x,a
mov a,!_a
callt [@@mulu]
movw de,#_i
callt [@@deist]
COMPATIBILITY
<From another C compiler to this C compiler>
⢠Modifications are not needed if the compiler does not use the functions for multiplication.
⢠To change to functions for multiplication, modify according to USAGE above.
<From this C compiler to another C compiler>
⢠Function names for multiplication can be used as function names by deleting the #pragma mul statement or
delimiting it with #ifdef.
⢠To use as functions for multiplication, modify the program according to the specifications of each compiler
(#asm, #endasm or asm() ;, etc.).
386
Userâs Manual U14872EJ1V0UM
|
▷ |