English
Language : 

CC78K0S Datasheet, PDF (317/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
Usage of saddr Area
sreg/_ _sreg
RESTRICTIONS
• If const type is specified, or if sreg/_ _sreg is specified for a function, a warning message is output, and the
sreg declaration is ignored.
• char type uses a half the space of other types and long/float/double/long double types use twice the space
of other types.
• Between char types there are byte boundaries, but in other cases, there are word boundaries.
• When -ZA is specified, only _ _sreg is enabled and sreg is disabled.
• In the case of int/short and pointers, a maximum of 92 variables per load module is usable (when saddr area
[FE20H to FED7H] is used). Note that the number of usable variables decreases when bit and boolean type
variables, register variables, or norec and noauto functions are used (normal model).
• In the case of int/short and pointers, a maximum of 104 variables per load module is usable (when saddr
area [FE20H to FEEFH] is used). Note that the number of usable variables decreases when bit, boolean
type variables, and shared areas are used (static model).
The following shows the maximum number of sreg variables that can be used per load module.
Table 11-7. Restrictions on sreg Variable Usage
Data Type
int/short, pointer
Usable Number of sreg Variables (per Load Module)
When saddr Area [FE20H to FED7H] is Used
When saddr Area [FE20H to FEEFH] is Used
92 variables max.Note
104 variables max.Note
Note When bit and boolean type variables are used, the usable number decreases.
EXAMPLE
(C source)
extern sreg int hsmm0;
extern sreg int hsmm1;
extern sreg int *hsptr;
void main ( ) {
hsmm0 -= hsmm1;
}
User’s Manual U14872EJ1V0UM
317