English
Language : 

CC78K0S Datasheet, PDF (311/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
EXAMPLE
(C source)
============ ca1.c ============
_ _callt extern int tsub ( );
============ ca2.c ============
void main ( )
{
int ret_val;
ret_val = tsub ( );
}
(Output object of compiler)
ca1 module
EXTRN
?tsub
callt
[?tsub]
_ _callt int tsub ( )
{
int val;
return val;
}
; Declaration
; Call
ca2 module
PUBLIC _tsub
PUBLIC ?tsub
@@CALT CSEG
CALLT0
?tsub: DW
_tsub
@@CODE CSEG
_tsub:
.
.
.
function body
.
.
.
; Declaration
;
; Allocation to segment
; Function definition
EXPLANATION
• The callt attribute is given to the function tsub() so that it can be stored in the callt table.
COMPATIBILITY
<From another C compiler to this C compiler>
• The C source program need not be modified if the keyword callt/_ _ callt is not used.
• To change functions to callt functions, observe the procedure described in the USAGE above.
<From this C compiler to another C compiler>
• #define must be used. For details, see 11.6 Modifications of C Source.
User’s Manual U14872EJ1V0UM
311