> I've copied the config bit setting stuff right out of p18f452.inc and > put it in config.asm as below. During linking, I get the following error: > > Error - Absolute code section '.config' must start at a word-aligned > address. The __CONFIG directive produces code in a special section named .CONFIG. The Microchip docs are very sketchy about all this, but the assembler does not set an absolute address for this section. This must be done in the linker control file. You have to look in the data sheet for whatever PIC you are using and find where the config word is, then set up a .config linker section fixed at that address. I haven't done a project yet with an 18 family PIC, so here is my linker control file for the 16F876 as an example: // Linker control file for the PIC 16F876 processor. // CODEPAGE NAME=config START=0x2007 END=0x2007 //special processor config word CODEPAGE NAME=code0 START=0 END=0x7FF //code page 0 CODEPAGE NAME=code1 START=0x800 END=0xFFF //code page 1 CODEPAGE NAME=code2 START=0x1000 END=0x17FF //code page 2 CODEPAGE NAME=code3 START=0x1800 END=0x1FFF //code page 3 DATABANK NAME=bank0 START=0x20 END=0x6F //register bank 0 DATABANK NAME=bank1 START=0xA0 END=0xEF //register bank 1 DATABANK NAME=bank2 START=0x110 END=0x16F //register bank 2 DATABANK NAME=bank3 START=0x190 END=0x1EF //register bank 3 SHAREBANK NAME=globalram START=0x70 END=0x7F PROTECTED //global regs, bank 0 SHAREBANK NAME=globalram START=0xF0 END=0xFF PROTECTED //global regs, bank 1 SHAREBANK NAME=globalram START=0x170 END=0x17F PROTECTED //global regs, bank 2 SHAREBANK NAME=globalram START=0x1F0 END=0x1FF PROTECTED //global regs, bank 3 SECTION NAME=.udata_shr RAM=globalram //global memory mapped to all register banks SECTION NAME=.BANK0 RAM=bank0 //for registers explicitly in bank 0 SECTION NAME=.BANK1 RAM=bank1 //for registers explicitly in bank 1 SECTION NAME=.BANK2 RAM=bank2 //for registers explicitly in bank 2 SECTION NAME=.BANK3 RAM=bank3 //for registers explicitly in bank 3 There are a lot of double-slash comment delimeters above. I'm using MS Outlook Express, and sometimes it decides on its own that a double slash could only be the start of a URL and "helfully" inserts the proper URL syntax. Does anyone know how to shut off this obnoxious behaviour? ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body