StuartA wrote:
I don't suppose there are any crunchers that compress executable code, not just basic?
I think it needs to be a bit clearer what you're trying to do. There's saving space for the purposes of moving things around (such as image compression), and then there's optimisation to make code smaller?
I suspect you're looking for the latter, and the answer would be that this could be done along the same lines as you have optimisers in compilers, but they would only be able to work with source code.
Why? Well, code might be self-modifying, relocating, or dependent on executing timing. You can't flag any of these things in the code itself, so you'd need an optimising assembler which could pick up directives aroudn pieces of code.
I can't see that anyone would bother with doing this for the 6502 instruction set.
If I've got the wrong end of the stick, then if you're looking to compress code, then it would have to be a non-lossy algorithm such as what WinZip might use, rather than JPEG. And you'd have to account for adding on new code that decompresses.