|
!Crunchie
v0.98 (21 Mar 2025)
|
Crunchie is a command-line utility written in BASIC to crunch BASIC files, written by the late Steve Drain and first released in 2018. It was updated by him until v0.93 in April 2021. The main features are...
- delete comments, blank lines, empty statements and spaces.
- shorten variable, procedure and function names.
- convert SWI names after SYS/SWI to numbers.
- convert ASC with literal strings to numbers.
- convert constant variables to literal values.
- remove debugging statements.
- remove unwanted routines.
- concatenate lines.
- crunch multiple library files to same values.
- append crunched libraries to the main program.
An updated Crunchie v0.96 was released, based on v0.93. The main changes were...:
- Fixed several simple errors.
- Removed duplicated or unused code and files.
- Corrected Analysis list for Literals and source files.
- Improved some error messages.
- Removed assumption that programs and Libraries start with REM.
- Avoided redundant colons at start/end of line.
- Moved all available releases and recent changes to RISC OS Git.
After some feedback, Crunchie 0.98 has been released, with the following changes...:
- Removed limits on numbers of variables, PROCs and FNs.
- Changed to always keep any commas after NEXT.
- If CHR$ inserts a quote into a literal, it is doubled.
- Inserted Crunch line with 1st REM lineno, or zero if none.
- Added Unused? to Analysis list for items referenced only once.
- Avoided losing ELSE when immediately after NEXT.
- Added blank if new E variable immediately after digit.
- Changed Analysis heading to be like Crunchie heading.
- Avoided loop if 1st line had REM but not at start.
- Optimised FNfirst_line and PROCout_msg.
- Stopped adding blank before E if at start of line.
- Stopped LET changing 1 character variables to literals.
- Catered for assembler opcodes with following text.
- Catered for too many ]'s closing assembler code.
- Corrected MOVEQ within assembler.
- Fixed OPT usage in assembler.
- Fixed eg LDRB r5,[optxxx] crunching as OPT+variable.
- Fixed problem with Assembler Shifts eg LSR.
- Keywords -basalt, -translate and -constants now error.
- Many updates to the Manual, and conversion to StrongHelp.
Feedback of cases it cannot handle, or suggestions for improvements, may provoke further releases.
Many may question whether a BASIC cruncher is of any use. I would suggest that for large programs it can be very useful. Crunchie takes 6 seconds to process a 1.5GB program spread over 43 source files. The 76% reduction gives real benefits in size and performance.
How to obtain Crunchie
To download v0.98 please click on
!Crunchie v0.98 (100 kByte Zip Archive)
After Steve sadly died in December 2022, it was his wish that his Kappa website and software remained available, and there is a full copy of his website available here, and Crunchie v0.93 is available here.
Please click home to return to the Avisoft home page.
E&OE. © Copyright Martin Avison, 2025
Last updated: Fri 21st March 2025
Please send any queries or comments to
This site is hosted by Force9 on Plusnet