As we know: "128 bit variables occupy the 16 bytes of Internal RAM from 20h through 2Fh"
I was taught to use bit variables like below:
UINT8 bdata var2A _at_ 0x2A; sbit bvar0= var2A^0; sbit bvar1= var2A^1; sbit bvar2= var2A^2; sbit bvar3= var2A^3; sbit bvar4= var2A^4;
But after compile/link the DATA MEMORY is:
... DATA 002AH 0001H ABSOLUTE BIT 002BH.0 0000H.3 UNIT _BIT_GROUP_ 002BH.3 0000H.5 *** GAP *** ...
Obviously 8-bit space at 0x2Ah is occupied even I declare only 5 bit variables. Thus _BIT_GROUP_(3-bit length) is placed from 0x2B...
My question is: 1. Can I assign other bit variables to 0x2A.5 ~ 0x2A.7 ? 2. Can I assign _BIT_GROUP(3-bit) to 0x2A.5~0x2A.7 ?
You are intermixing the BDATA address space with SFR's. See http://www.keil.com/support/docs/1916.htm where this restriction is explained. It does not apply to BDATA.
You should actually learn about the 8051 architecture where this is explained too.
Thanks ! I see...!