HTBasic Help
×
Menu
Index

Secure Utility

 
The SECURE utility processes an HTBasic program file for distribution to make it smaller and harder to reverse engineer by: removing most of the embedded program information; compressing the unused control table space; and setting the secure flag for all the program lines.  
 
WARNING:  Safeguard the original PROG file!  There is NO way to recover it once the variable, I/O path, and line label names have been removed.
 
This utility removes embedded program information including: Variable names, I/O path names, Line label names, REM and ! comment text.
 
Names of variables, I/O paths, and line labels are removed and set to 2 form-feed characters.  This can be disabled with the IOPath Names, Leave Labels, and Leave Variables options.  The Specify Hexadecimal Name Value option converts names to random 8 digit hexadecimal values.
 
This utility does not remove the COM area, SUB subprogram, or DEF function names. The Scramble Remaining Names option scrambles any names that are not removed.  This allows COM area, SUB subprogram, and DEF function names to be obscured but to still function correctly. When securing programs that call and use DLL's, it is necessary to deselect Scramble Remaining Names.
 
In case it is referenced by another program line, only the REM text is remove.  All "!" Comments are removed from the end of all program lines except DATA statements.  This can be disabled with the Leave Comment Text option.  If the program does not branch to any REM or ! Comment lines the entire REM or ! Program line may be deleted with the Remove Comment Lines option.  If the REM or ! Comment line has a line label, only the comment text will be removed.
 
The secure flag is set for all program lines to make them unlistable. This is disabled with the Allow Program Listing option.
 
Use the following sequence to process an HTBasic PROG file.
 
1. Run HTBasic.
2. GET or LOAD all the program subprograms and functions into memory.
3. PRE-RUN the program by pressing the STEP or F1 function key
4. STORE or RE-STORE the program to disk.
5. Launch the SECURE program from the Tools menu with the desired options.
6. LOAD the new PROG file into memory.
 
The PROG file is now ready for distribution.