This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to define a bit variable at a specific bit location?

Hi,

I'm trying to define a bit variable at a specific bit location.

I tried the following without succes:

       BSEG AT 02FH.7
MYBIT: DBIT 1
The linker complains with
*** ERROR L107: ADDRESS SPACE OVERFLOW
SPACE: BIT
SEGMENT: ?BI??TEST?1
LENGTH: 000000H.1

The following works but the linker is assigning the address (and that is not what I want):
TEST_BIT SEGMENT BIT
       RSEG TEST_BIT
MYBIT: DBIT 1

Or I could assign the whole byte and then target the bit that I want (but then I have 7 unused bits):

       DSEG AT 02FH
MYBIT8: DS 1
sbit MYBIT=MYBIT8^7;

Shouldn't the first version work?

Geert

Parents Reply Children
  • Erik,

    I was using the LX51 linker.
    It looks like I have to define the address once more in the user segments to get it linked :

    ?BI??TEST?1(0x2F)
    
    Looks strange to me to repeat the address information for the linker.

    When I use the BL51 linker, it links ok without specifying any link option.

    Thank you for your time,

    Geert