You need to create a section for it, not a codepage. I have found a trick, a workaround somewhere (well, actually mixture of different ideas about how to eliminate the .cinit section, so I am just putting these together). Create a codepage name cRUBBISH or something else on an invalid address range, then a section .cinit within this codepage: .... CODEPAGE NAME=3DcRUBBISH START=3D0x7000 END=3D0x7FFF PROTECTED .... SECTION NAME=3D.cinit ROM=3DcRUBBISH // Throw away .cinit .... Now the map looks good, and the two RETLWs are located at 0xF000: Section Info Section Type Address Location Size(Bytes) --------- --------- --------- --------- --------- rst code 0x000000 program 0x000006 int code 0x000004 program 0x000002 .cinit romdata 0x007000 program 0x000004 So if you open the hex file with a text editor, you will see the separated ..cinit section: :020000040000FA :060000000030A000022800 :020008000428CA :04E0000000340034B4 <------ .cinit :00000001FF Note, the .cinit marker so you can see what I mean, but you can easily find this line with any text processing tool like sed, awk, Perl, etc if you look for the line starting with :04E000 (assuming you use 0x7000 as the starting address for the section) So you just delete that line, and your hex is free from the .cinit section. Tamas On 19 August 2012 08:10, John Coppens wrote: > On Sun, 19 Aug 2012 11:57:47 +0200 > Jan-Erik Soderholm wrote: > > > Yes, I was only testing the short abs-only code that Tamas posted... :-= ) > > The thread is getting confusing, and I am even more confused. I did some > more tests, based on several suggestions and some between-the-lines: > > I have this .lkr script (note the addresses for .cinit, and resetvec. For > some > reason the addresses are interchanged) > > CODEPAGE NAME=3Dresetvec START=3D0x0 END=3D0x3 > CODEPAGE NAME=3Dintserv START=3D0x4 END=3D0xff > CODEPAGE NAME=3Dpage0 START=3D0x100 END=3D0x7FF > CODEPAGE NAME=3Dpage1 START=3D0x800 END=3D0xDFF > CODEPAGE NAME=3D.cinit START=3D0xE00 END=3D0xE0F > > CODEPAGE NAME=3D.idlocs START=3D0x2000 END=3D0x2003 PROTECTED > CODEPAGE NAME=3D.config START=3D0x2007 END=3D0x2007 PROTECTED > CODEPAGE NAME=3Deedata START=3D0x2100 END=3D0x217F PROTECTED > > DATABANK NAME=3Dgpr0 START=3D0x20 END=3D0x6F > > SHAREBANK NAME=3Dshr1 START=3D0x70 END=3D0x7F > > ... > > The generated map: > > Section Info > Section Type Address Location Size(Bytes) > --------- --------- --------- --------- --------- > .cinit romdata 0x000000 program 0x000004 > intserv code 0x000004 program 0x0000d6 > page0 code 0x000800 program 0x000918 > resetvec code 0x000e00 program 0x000008 > .config_2007_BUILD/DEFAULT/PRODUCTION/MAIN.O code 0x002007 > program 0x000002 > gpr0 udata 0x000020 data 0x00002a > shr1 udata 0x000070 data 0x000002 > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 int main() { char *a,*s,*q; printf(s=3D"int main() { char *a,*s,*q; printf(s=3D%s%s%s, q=3D%s%s%s%s,s,q,q,a=3D%s%s%s%s,q,q,q,a,a,q); }", q=3D"\"",s,q,q,a=3D"\\",q,q,q,a,a,q); } --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .