English
Language : 

CC78K4 Datasheet, PDF (361/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
(16) Allocation function
Allocation Function
CHAPTER 11 EXTENDED FUNCTIONS
Allocation function -CS
FUNCTION
• With the medium model (when the -MM option is specified) or with the large model (when the -ML option is
specified), the allocation of the saddr area can be changed by using the -CS option.
EFFECT
• When the -CS15 option is specified, the code space can be continuously used.
USAGE
• The -CS option is specified during compilation.
The -CS option performs the following operation.
-CS0:
-CS15/-CS0FH:
-CSA:
Allocates saddr area to 0FD20H to 0FFFFH
Allocates saddr area to 0FFD20H to 0FFFFFH
Does not check with compiler but with linker
RESTRICTIONS
• Use the startup routine included with to this compiler that specifies the location specified by the -CS option.
The LOCATION instruction is described in the startup routine (for details of the startup routine, refer to the
CC78K4 C Compiler Operation User’s Manual (U15557E)).
EXAMPLE
(C source)
void main ( ) {
/* function body */
}
(Output object of compiler)
With large model (-ML) and location 0 (-CS0) specified
$CHGSFR (0)
$PROCESSOR(4026)
;Variable declaration etc.
@@CODE
CSEG
_main:
;Function preprocessing
;Function body processing
;Function postprocessing
ret
User’s Manual U15556EJ1V0UM
361