[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

compressing Applesoft



There are some pretty good utilities in the Nibble magazines for removing redundant information from a program to allow it to run a little faster.  After all, applesoft is known for its not so blazing speed.  One of my favorite past times is re-inventing the wheel.

There are utilities to remove REMarks, reduce variables to a single letter. combine multiple lines into one, etc.  These programs are about $400 (1024) bytes in length, each, as entered from the magazine.

My reinvention will do the following:

it removes REMarks, it removes semicolons where not needed (does not remove from INPUT statement, between variables A;B;C or before a colon or at the end of a line), it removes extra letters of variables down to 2 letters, it removes variables after the NEXT token and converts its variables from NEXT I,J,K to NEXT:NEXT:NEXT  - which is supposed to execute faster, and all was done in less than $1B0 (432) bytes and is 4x faster than the single programs listed above.  May add the feature to combine lines later.  I dislike DATA statements but it would be neat to see an entire list of DATA statements combined into one.  Even though the line length would be way greater than 249, this compressed program would not be used for editing, just space savings and speed.

If I only knew 25 years ago what I know now.

Rob