Keil Logo


The 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:

  1. Defining the SFRs in a C source file,
  2. Compiling the file using the ORDER directive,
  3. Note

    • All SFRs (including extended SFRs) are defined in the SFR Definitions Files for each supported microcontroller. While it is possible to do, there is no need to use the ebdata type to define SFRs.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.