From the app note:
The number of bytes reserved vary from device to device. The values shown above are for the 18F1320, which can be found in the MPLAB online documentation under "HELP...TOPICS...MPLAB ICD2...Resources Used by MPLAB ICD 2". The DEBUG = true configuration fuse is used for ICD. It is very important that the DEBUG configuration is not used if you are building release code or you are not going to use ICD. If this fuse is enabled, your program will not run outside of the ICD environment. The best thing to do is create an #option, so you can easily enable or disable ICD. This is the code I used in the "Junebug.bas" module, shown later:
// if you want to use ICD, then set '#option ICD = true' in your main program
// before you include this module...
#if IsOption(ICD) And ICD
#option ISR_SHADOW = false
#variable _maxram = _maxram - $C // constrain RAM
#variable _maxrom = _maxrom - $1C0 // constrain ROM
Config DEBUG = ON // DEBUG fuse ON
Where does $C and $1C0 come from? In the MPLAB ICD2 Help/Resources for the PIC18f1320 it says PIC18F1320 0x1E40-0x1FFF 0xF4-0xFF How does that relate to $C & $1C0 ??
I must be looking in the wrong spot or something. I need a bit more info I think. I'll be working with a 18F8722
Thanks
Doug[/quote]