English
Language : 

CC78K0S Datasheet, PDF (388/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
Division Function
#pragma div
RESTRICTIONS
• The division functions are not expanded in line, but are called by the library.
EXAMPLE
(C source)
#pragma div
unsigned int a = 0x1234 ;
unsigned char b = 0x12 ;
unsigned char c ;
unsigned int i ;
void main () {
i = divuw(a, b) ;
c = moduw(a, b) ;
}
(Output object of compiler)
mov
mov
movw
callt
callt
movw
callt
mov
mov
movw
callt
callt
mov
mov
a,!_b
c,a
de,#_a
[@@deilo]
[@@divuw]
de,#_i
[@@deist]
a,!_b
c,a
de,#_a
[@@deilo]
[@@divuw]
a,c
!_c,a
388
User’s Manual U14872EJ1V0UM