The PicStrip Utility

Included in the distribution is a utility to strip unused code from an assembly language file generated by picforth. Just give it the name of the file it should process on the command line.

picstrip  myapp.asm

As a side benefit, picstrip will inform you the maximum depth that each word will nest the hardware return stack. Keeping this number well under 16 (less if you will be using interrupts) can help you avoid return stack overflows. The algorithm is not infallible however, and can't distinguish between returning calls, and calls that never return (possibly error handling code.) To remedy this, you can define non-returning words with :zzz instead of : , and the stripper will not include that call in its stack nesting calculation.