|
|||||||||||
Technical Support On-Line Manuals Cx51 User's Guide ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
bitThe bit type defines a single-bit variable. It is used as follows: bit name <[>= value<]>; Where
The bit type may be used for variable declarations, argument lists, and function-return values. A bit variable is declared like other C data types. For example: static bit done_flag = 0; /* bit variable */ bit testfunc ( /* bit function */ bit flag1, /* bit arguments */ bit flag2) { . . . return (0); /* bit return value */ } All bit variables are stored in a bit segment located in the internal memory area of the 8051. Because this area is only 16 bytes long, a maximum of 128 bit variables may be declared within any one scope. Memory types may be included in the declaration of a bit variable. However, because bit variables are stored in the internal data area of the 8051, data and idata memory types only may be included in the declaration. Any other memory types are invalid. The following restrictions apply to bit variables and bit declarations:
| ||||||||||
|
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.