|
|||||||||||
|
Technical Support On-Line Manuals C251 User's Guide |
C251 User's GuideebdataThe ebdata memory specifier refers to the extended 251 bit addressable memory in the internal data area (20H to 7FH). This memory type specifier allows you to declare data types that can also be accessed at the bit level. However, compared to the bdata memory area, bit access to ebdata memory requires a longer opcode encoding. Variables declared ebdata are located in the SDATA group. Declare ebdata variables as follows: unsigned int ebdata eb_var; Declare bits within an ebdata variable as follows:
struct s {
unsigned int b0:1;
unsigned int b1:1;
unsigned int b2:1;
unsigned int b3:1;
unsigned int b4:1;
unsigned int b5:1;
unsigned int b6:1;
unsigned int b7:1;
};
struct s ebdata v;
void main (void) {
if (v.b1) {
v.b0 = 1;
}
}
You may use ebdata variables to access extended SFRs by:
| ||||||||||
|
|||||||||||