Keil Logo

C251: EXTERNAL EXTENDED BIT VARIABLES

QUESTION

I'm trying to use extended bit variables in my C251 program and the compiler doesn't generate the correct code. Can you offer some suggestions?

ANSWER

You should first of all refer to page 107 in the 09.97 edition of the C251 manual for the correct way to declare bits in the extended area. In general, define extended bits as follows:

unsigned char ebdata variable1;
sbit bit1 = variable1 ^ 0;

Define external extended bits as follows:

extern bit ebdata bit1.

Do NOT define your external extended bits as follows:

extern bit bit1;

The above external declaration (extern bit bit1) does not tell the compiler that this bit is located in ebdata!

You will need C251 Version 2.14n and L251 Version 1.30 for extended bit variable support. Contact our technical support group for these files if you don't already have them.

Last Reviewed: Friday, May 26, 2000


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  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.