We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
TEST_BIT SEGMENT BIT RSEG TEST_BIT MYBIT: DBIT 1
DSEG AT 02FH MYBIT8: DS 1 sbit MYBIT=MYBIT8^7;
I have never tried this, but it could be that BSEG needs a regular numeric address like this:
BSEG AT 07FH 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): Not if you do
DSEG AT 02FH MYBITB8: DS 1 sbit MYBITF8=MYBITB8^0; ..... sbit MYBITFf=MYBITB8^7;
Graham,
Erik,
sbit MYBIT 0f8h;
BSEG AT 30h ; absolute bit segment @ 30h DEC_FLAG: DBIT 1 ; absolute bit INC_FLAG: DBIT 1
The syntax is indeed correct, but is there something more to do to avoid the link error? BSEG AT 30h ; absolute bit segment @ 30h yes, locating the BSEG withinthe bit addressable area. Erik
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)