English
Language : 

CC78K0S Datasheet, PDF (335/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
(7) bit type variables
bit Type Variables
boolean Type Variables
bit
boolean
_ _boolean
FUNCTION
• A bit or boolean type variable is handled as 1-bit data and allocated to the saddr area.
• These variables can be handled the same as external variables that have no initial value (or have an unknown
value).
• The C compiler outputs the following bit manipulation instructions for these variables.
SET1, CLR1, NOT1, BT, BF instruction
EFFECT
• Programming at the assembler source level can be performed in C, and the saddr and sfr areas can be
accessed in bit units.
USAGE
• Declare a bit or boolean type inside a module in which the bit or boolean type variable is to be used, as
follows:
• _ _boolean can also be described instead of bit.
bit variable-name
boolean variable-name
_ _boolean variable-name
• Declare a bit or boolean type inside a module in which the bit or boolean type variable is to be used, as
follows.
extern
extern
extern
bit variable-name
boolean variable-name
_ _boolean variable-name
• char, int, short, and long type sreg variables (except the elements of arrays and members of structures) and
8-bit sfr variables can be automatically used as bit type variables.
variable-name. n (where n = 0 to 31)
User’s Manual U14872EJ1V0UM
335