It just might be a good idea for somebody to talk to microchip about this one.

The DEBUG in the .inc file, does not point to the DEBUG config bit as one might expect. That bit is defined as ...
<pre>_DEBUG_ON_4L EQU H'7F' ; Enabled<br>_DEBUG_OFF_4L EQU H'FF' ; Disabled</pre>
Instead, it points to register FD4h.
<pre>DEBUG EQU H'0FD4'</pre>In the datasheets, FD4h is shown as ... 2: Unimplemented registers are read as ‘0’.

If it's an unimplemented register, why define it in the .inc file.

My guess is that it is used by the "ICD2 executive" program when in debug mode. And, I'm also guessing that the DEBUG equate, is in there by mistake, because the ...

P18F2525.INC
P18F25K20.INC
P18F2620.INC
P18F4525.INC
P18F45K20.INC
P18F4620.INC

files, all have the same problem. These chips all have the same basic Core, so the .inc files were probably just copies of each other, with small changes for each chip. Propagating the error along with it.

Perhaps if they knew about it. You might not have to make the changes after the next Upgrade.
<br>