English
Language : 

CC78K0S Datasheet, PDF (340/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
ASM Statements
#asm, #endasm
_ _asm
RESTRICTIONS
• Nesting of #asm directives is not allowed.
• If ASM statements are used, no object module file will be created. Instead, an assembler source file will be
created.
• Only lowercase letters can be described for _ _asm. If _ _asm is described with uppercase and lowercase
characters mixed, it is regarded as a user function.
• When the -ZA option is specified, only _ _asm is enabled.
• #asm - #endasm and _ _asm can only be described inside a function of the C source. Therefore, the
assembler source is output to CSEG with the segment name @@CODE.
EXAMPLE
(a) #asm - #endasm
(C source)
void main ( ) {
#asm
callt [init]
#endasm
}
(Output object of compiler)
The assembler source written by the user is output to the assembler source file.
@@CODE
_main:
CSEG
callt [init]
ret
END
EXPLANATION
• In the above example, statements between #asm and #endasm will be output as an assembler source
program to the assembler source file.
340
User’s Manual U14872EJ1V0UM