Keil Logo

BOF Assembler Operator

Arguments
BOF bit-operand


Description

The BOF (Bit Offset) operator returns the bit position of a bit variable in the bit-addressable word in which it is defined. The result is nearly always an absolute number except when BOF is applied to an externally defined bit variable. The operand to BOF must be of type BIT.

See Also

POF, SOF

Example
                1    D100    SECTION DATA BITADDRESSABLE
0000            2      V1    DSW     1
                3    D100    ENDS
                4
                5    BIT1    BIT     V1.15
                6    BIT2    BIT     V1.1
                7    BIT3    BIT     0FD10h.8
                8    EXTRN   EBIT : BIT
                9
               10    C100    SECTION CODE
               11    P100    PROC    NEAR
0000 E084      12            MOV     R4,#BOF BIT3 ; R4=8
0002 E0F5      13            MOV     R5,#BOF BIT1 ; R5=15
0004 E015      14            MOV     R5,#BOF BIT2 ; R5=1
0006 E005 E    15            MOV     R5,#BOF EBIT ; determined by linker
               16    P100    ENDP
               17    C100    ENDS
               18    END
  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.