User Tools

Site Tools


using_20the_20built-in_20program_20cruncher

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

using_20the_20built-in_20program_20cruncher [2018/03/31 13:19]
127.0.0.1 external edit
using_20the_20built-in_20program_20cruncher [2018/04/15 18:35] (current)
tbest3112 Added syntax highlighting
Line 8: Line 8:
   * Abbreviate names   * Abbreviate names
 \\  The only way to apply these options to your code is to compile the program, however once the program is compiled there is no simple way to load the crunched program from the executable back into the editor.\\ \\  Using the following technique it is possible to use the compiler to crunch your programs and save them in a way that they can be loaded back into the editor. This is achieved by making the compiled program save a copy of itself. Note that certain crunch options and combinations thereof can render programs uneditable. Always keep a backup of your original source code.\\ \\  To crunch a program the copy and paste the following two lines at the start of your program:​\\ ​ \\  The only way to apply these options to your code is to compile the program, however once the program is compiled there is no simple way to load the crunched program from the executable back into the editor.\\ \\  Using the following technique it is possible to use the compiler to crunch your programs and save them in a way that they can be loaded back into the editor. This is achieved by making the compiled program save a copy of itself. Note that certain crunch options and combinations thereof can render programs uneditable. Always keep a backup of your original source code.\\ \\  To crunch a program the copy and paste the following two lines at the start of your program:​\\ ​
 +<code bb4w>
         OSCLI"​Save """​+FNVif93Ux+"""​ "​+STR$~(PAGE+?​PAGE+?​(PAGE+?​PAGE))+"​ "​+STR$~TOP:​QUIT         OSCLI"​Save """​+FNVif93Ux+"""​ "​+STR$~(PAGE+?​PAGE+?​(PAGE+?​PAGE))+"​ "​+STR$~TOP:​QUIT
         DEF FNVif93Ux=@dir$+"​Crunched.bbc"​         DEF FNVif93Ux=@dir$+"​Crunched.bbc"​
 +</​code>​
 Once these lines have been added at the very start of the program choose the compile option from the tool bar or the Utilities menu of the BBC BASIC for Windows editor. Set the crunch options you want to be applied to your code and compile the program.\\ \\  Now run the compiled executable to recover the crunched version of the program.\\ \\  By default the crunched program will be saved as Crunched.bbc in the same directory as the compiled executable. To change the name or location of the saved file change **@dir$+"​Crunched.bbc"​** in the second line to point to where you want the file to be saved. If you change the file name be careful not to overwrite your original program. Once these lines have been added at the very start of the program choose the compile option from the tool bar or the Utilities menu of the BBC BASIC for Windows editor. Set the crunch options you want to be applied to your code and compile the program.\\ \\  Now run the compiled executable to recover the crunched version of the program.\\ \\  By default the crunched program will be saved as Crunched.bbc in the same directory as the compiled executable. To change the name or location of the saved file change **@dir$+"​Crunched.bbc"​** in the second line to point to where you want the file to be saved. If you change the file name be careful not to overwrite your original program.
using_20the_20built-in_20program_20cruncher.txt ยท Last modified: 2018/04/15 18:35 by tbest3112