Keil Logo

A51: Bit-addressable Data Variables


Information in this article applies to:

  • C51 Version 5.50a
  • C51 Version 6.10a

QUESTION

How do I create a data variables that is bit-adderssable in the A51 assembler?

ANSWER

The following example program shows you how to accomplish this:

BIT_VAR         DATA    20h

FUNNY_ERROR     BIT     BIT_VAR.0
STAT_ERROR      BIT     BIT_VAR.1
ANOTHER_ERROR   BIT     BIT_VAR.2

cseg    at      0

        MOV     BIT_VAR, #0

        CLR     FUNNY_ERROR
        SETB    STAT_ERROR

        JNB     ANOTHER_ERROR, loop

loop:   jmp loop


END

SEE ALSO


Last Reviewed: Thursday, February 25, 2021


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.