I don't know what your needs are, but I have had two instances where I needed to
automatically watch the code size:
1. I use MCLOADER, which occupies some of the chip's upper memory.
I need to make sure my compiled code does not "run into" the bottom of MCLoader.
2. I sometimes want to know if my code is small enough to fit into a smaller, cheaper chip.
The technique I use is to add a few statements at the end of my programs -
ASM
ORG 0x1fcee <=== Put the address you don't want to over-run here.
nop
ENDASM
If the code is too big and over-runs the ORG address, MPASM will flag an error.
Bookmarks