On Wed, Oct 02, 2013 at 10:24:35AM +0200, Jan-Erik Soderholm wrote: >=20 >=20 > Charles Douvier wrote 2013-10-02 03:03: > > I tried cblock 0x20... No luck. I think it's because I had MPLAB was se= t > > up for relocatable code. It also wouldn't work in simulation... I was > > curious. This .lst file showed the variables there... Mixing and matching is a really bad idea. Go straight absolute and control all allocations, or straight relative and let the linker control allocations. >=20 > Note that cblock doesn't create any "variable" at all. Correct. In fact CBLOCK stands for "Constant Block". In absolute mode it's convenient to attach names to specific values which can then be used as variables. But as Jan-Eri points out,=20 > And it doesn't allocate any memory either. again correct. >=20 > MPLAB or the simulator has no way at all to know that > *you* actuly ment to create a memory reference. It could > have been a constant meening just about anything. Hence the name constant block. I don't think any simulator would show the mapping between those constants and specific memory locations. Bottom line is pick one mode (absolute or relative) and stick to it. BAJ --=20 Byron A. Jeff Chair: Department of Computer Science and Information Technology College of Information and Mathematical Sciences Clayton State University http://faculty.clayton.edu/bjeff --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .