Enumerations

An enum in C has a unique name and a defined value (refer the following listing).

Listing: Enumerations
#pragma CREATE_ASM_LISTING ON 
enum {

 E1=4,

 E2=47,

 E3=-1*7

};

The Compiler generates enums as EQU directives (refer the following listing).

Listing: Enumerations
E1                      EQU $4
E2                      EQU $2F

E3                      EQU $FFFFFFF9
Note: The Compiler generates negative values as 32-bit hex numbers.