cdb escreveu: > > :: I think the word "constant" may be a clue here..... > > I thought that as well, but this doesn't work either, that is not a = > declared constant. > > *fnt =3D 0x7E; > > Although this is going into a 24F series, I have to use the const as = > I'm trialling the program in a 16F877A. > > This doesn't explain why uC 'C' works with this code but FED_C = > doesn't. > > Try *fnt ^=3D 0xFF > > Nope ignores that as well. > > In the assembler listing, the inverted number is put into the INDF = > register and is just left there. > > ;~ Line : 00057 (*fnt)^=3D 0xFF; > > bcf STATUS,IRP > movlw 39 > call LoadWD > movfw ACC > > bcf STATUS,IRP > btfsc ACC+1,0 > bsf STATUS,IRP > movwf FSR > movlw 255 > xorwf 0 > > ;~ Line : 00058 } > > SETPCLATH GLCD_disp_char,0,0 > L000153: > > ;~ Line : 00059 = > > > ;~ Line : 00060 for (indx =3D = > > Time for bed, look at it fresh in the morning. > > Colin > -- > cdb, colin@btech-online.co.uk on 9/26/2009 > = > Web presence: www.btech-online.co.uk = > = > Hosted by: www.1and1.co.uk/?k_id=3D7988359 It all depends on how you declared your array. If you declared like this: const char array[] =3D { value1, value2, ... }; Then some compilers will allocate your array in RAM and others may allocate it in FLASH, but neither will allow you to change its content. Some compilers need the extra 'rom' qualifier to place your array in FLASH, for others just the 'const' qualifiers is enough. But if you declare it without 'const:' char array[] =3D { value1, value2, ... }; Then it will be allocated in RAM and everything will be OK. If you declared your array as 'const' but is sure it resides in RAM, you could use a second pointer to deceive the compiler: const char array[] =3D { value1, value2, ... }; char *p; *array ^=3D 0xff; // Will give an error, you said the contents must not be changed... p =3D (char *)array; // Should give a warning, that's a dangerous thing. *p ^=3D 0xff; // Works OK if array is in RAM. Please note that the above code is bad programming practice. Also, some really good compilers will not allow you to assign a const pointer to a non-const one. Regards, Isaac __________________________________________________ Fa=E7a liga=E7=F5es para outros computadores com o novo Yahoo! Messenger = http://br.beta.messenger.yahoo.com/ = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist