Charles Douvier wrote 2013-10-02 03:03: > I tried cblock 0x20... No luck. I think it's because I had MPLAB was set > up for relocatable code. It also wouldn't work in simulation... I was > curious. This .lst file showed the variables there... It is not clear what you meen with that the .lst file "showed the variables there". Could you post an example? Note that cblock doesn't create any "variable" at all. And it doesn't allocate any memory either. 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. > and I didn't get > any errors they just seemed they couldn't be modified. What is "they" here? I'm not sure that the value of the constant itself can be changed. The constant can be used anywhere a constant is valid in an instruction, of course. Such as an address in a file instruction. I might have lost the start of all this. :-) Finaly, as others has said, use relocatable mode. NOTE! CBLOCK can very well be used in reloatable mode also, but then for it's original use, to create a "block of constants", not for memory addresses... Regards, Jan-Erik. > > Chas > > --- > > This e-mail was sent from my iPhone to provide you my quickest response. > Please forgive the "corrected" misspellings and brevity of my mobile > e-mails. > > On Oct 1, 2013, at 5:21 PM, IVP wrote: > >> >> >>> In his simple example he probably could have gotten away with >>> >>> cblock H'20' >> >> Yes, sorry, not org. I just looked at a project of mine and see >> >> cblock 0x20 >> >> Not something I usually worry about or give much thought to after it's >> set. It'll be either 20 or 00, depending on the family, eg 16 or 18 >> >> Joe -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list >> archive View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist > --=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 .