|
CC78K4 Datasheet, PDF (401/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language | |||
|
◁ |
CHAPTER 11 EXTENDED FUNCTIONS
Data Insertion Function
#pragma opc
RESTRICTIONS
⢠The function names for data insertion cannot be used as the function names (when #opc is specified).
⢠_ _OPC must be described in uppercase letters. If it is described in lowercase letters, it is handled as an
ordinary function.
EXAMPLE
(C source)
#pragma opc
void main ( ) {
_ _OPC(0xBF);
_ _OPC(0xA1, 0x12);
_ _OPC(0x10, 0x34, 0x12);
}
(Output object of compiler)
_main:
; line 4 : _ _OPC (0xBF);
DB 0BFH
; line 5 : _ _OPC (0xA1, 0x12);
DB 0A1H
DB 012H
; line 6 : _ _OPC (0x10, 0x34, 0x12);
DB 010H
DB 034H
DB 012H
ret
COMPATIBILITY
From another C compiler to this C compiler
⢠Modification is not required if the compiler does not use the functions for data insertion.
⢠When changing to functions for data insertion, modify the program according to the method above.
From this C compiler to another C compiler
⢠Delete the #pragma opc statement or delimit it with #ifdef.
⢠Function names for data insertion can be used as function names. When using as a function for data
insertion, modification is required according to the specification of each compiler (#asm, #endasm or
asm() ; , etc.).
Userâs Manual U15556EJ1V0UM
401
|
▷ |