Here is a copy from idata.c: 70 unsigned num, size; 71 __code cinit_t *cptr; 72 __code char *src; 73 __data char *dst;
I think *cptr is not takes place in code memory rather in data memory. So the __code modifier shouldn't be in line 71. I tried it, and it is working for me. The generated code is more beautiful: ; .line 76; "../idata.c" cptr = &cinit.entry[0]; MOVLW high (_cinit + 2) MOVWF r0x1002 MOVLW (_cinit + 2) MOVWF r0x1003 MOVLW 0x80 MOVWF r0x1004 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user