15. Frequently Asked Questions

  1. I am not interested in the many Squashing Options that StrongBS has, I just want to load my program and its accompanying libraries and produce an output that contains my main program plus the procedures and functions in the LIBRARY files that the main program needs. I don't want to remove anything else or compress anything. Can StrongBS do that for me?

    Yes, to do that carry out the following:

    1. Create a text file and name it "SBSMake". Type the following in the SBSMake file:

      SBSLinkFile:
      library_filename1
      library_filename2
      library_filename3
      ....etc.

      or

      SBSLinkDir: library_directory_name

      The second method will link ALL files in the directory.

    2. Store the "SBSMake" text file in the same directory as your core BASIC program.
    3. Clear all Squash Modes by clicking on the "Clear All" entry in the "Squash Options" menu. This action clears all selected options.
    4. Select "Remove unused functions" and "Remove unused procedures" from the "Squash Options Routines" sub-menu.
    5. Load in your core BASIC program.
    6. Now you can press the "Squash" button to generate the result file.
    In the above example we have created a new squash mode that only removes unused functions and unused procedures. If you want you can add it to the "Squash Modes", so next time you do not have to repeat the above process. StrongBS comes with a Squash mode called "Library" that just removes unused procedures and functions, this can be selected from the Squash options menu list.

  2. I want StrongBS, on startup, to automatically select my favourite Squash Mode. How can I do that?

    Select the default squash mode from the Choices window. Then save your choices.

  3. I want to change the color of the progress bar. How can I do it?

    Load the "Messages" file located in the "Resources" directory into your text editor. Locate the token "BarColor:". The number after the token is the default color, change it to a color number between 0 to 15.

  4. I have a LIBRARY file that I want StrongBS to compress along with my program, how can I tell it to?

    The easiest way is to create a text file called "SBSMake" and store it in the same directory as your BASIC program. Type the following in the text file:

    SBSLinkFile: your_Library_filename_path

    If your LIBRARY file is in the same directory as the core BASIC program then you can use:

    SBSLinkFile: .filename

    See Chapter 10 above for more details....

  5. What is "Debug code removal"? how can I use it? I have lots of code of this sort in my program, and I just don't want it to be compressed, I want it to be removed. How can I do that?

    Any code that you want to be removed completely, and not appear in your output compressed BASIC program can be bracketed between two identifiers, so that StrongBS knows about it. The start identifier is "REM --[" and the end identifier is "REM ]--". Anything between these two identifiers will be completely removed. Here is an example:

    10 .......
    20 REM --[
    30 debug%=TRUE
    40 REM ]--
    50 .......
    .....
    1030 .......
    1040 REM --[
    1050 IF debug% THEN PROCdebug_msg
    1060 REM ]--
    1070 .......
    .......
    4000 REM --[
    4010 DEF PROCdebug_msg
    4020 .....some more debugging code ...
    4030 ............
    4040 ENDPROC
    4050 REM ]--
    4060 ....
    ........
    In the above example program, all code that would only be used during the development stage for debugging is bracketed between the two identifiers. If the option "Remove Debug" is selected, then StrongBS will automatically remove lines 20 through 40, lines 1040 through 1060 and lines 4000 through 4050.

  6. I want to create my own "Squash Modes". How can I do that?

    First, setup the squash options you need by selecting those you need and de-selecting those you don't.

    Now go to the "Create New Mode" sub-menu in the "Squash Modes" menu.

    Enter the "Mode Title", this is the title of the mode that will appear in the Modes Menu, and enter the "Mode File", this is the filename under which your mode definitions will be saved into the Modes Directory. Press "SAVE" when ready.

    If you now, go to the "Modes Menu" you will see the "Squash Mode" you have created listed and selected as the current Squash-Mode.

  7. How can I remove a "Squash Mode" that I have created from the "Squash Modes" menu?

    In the "Modes Directory", locate the filename that contains the mode definition and delete it. Now re-start StrongBS, it will be gone.

  8. I only have two variables that I don't want StrongBS to change. I don't want to use a "Special File", is there a shortcut?

    You can use a REM line in your program. Follow the REM keyword with the word "LOCK" and then your variable name.

    Here is an example:

    If you want the variables memory_area% and pointer%() not to be renamed, then you should have the following line in your program:

    1000 REM LOCK memory_area%,pointer%(

    Important Note: An array variable should be entered until the first opening bracket only. i.e. for pointer%() use pointer%(.

  9. Can I re-compress the result program again to gain further savings?

    Yes, you can do that by clicking the "Squashed" button again as many times as you like.

    StrongBS will try its best to produce the best compression from the first pass. Some routines have been optimized to do that already, however, some routines still don't achieve all they could from the first pass, and a second compression pass may squash the program further saving on few bytes!

    Warning: StrongBS may not like to re-compress some programs because of a limitation in the current version. StrongBS will let you know in that case.!!

  10. How can I tell StrongBS about my "Special File" which contains my locked variables?

    Two methods are used:

    1. Name your Special file "SBSMake" and place it in the same directory as the core BASIC program. StrongBS will automatically load the file and process it whenever you drag the core BASIC program into StrongBS.
    2. Just drop your "Special File" into StrongBS. StrongBS will then use it for the current BASIC program already loaded into memory. You should load your BASIC program BEFORE loading the Special File. When loading a BASIC program, StrongBS ignores any previously loaded Special files.

  11. I have a program that has locked variables defined after the "REM LOCK" keyword, can I add more locked variables using a "Special File"?

    Yes. Any locked variables in a "Special File" are added to those already defined in your program after the "REM LOCK" keyword if any.

  12. In what format should I write the "Special File"?

    The "Special File" is a text file that lists all variables and routine names that you don't want StrongBS to rename.

    The first word of the file should be the word "LOCK:" on a separate line. Following this, you list your variables. Please note that this is the word "LOCK" immediately followed by a colon.

    When listing your variables, you can either list each variable on a separate line or separated them by commas.

    You can use comments if you like using any of the following reserved characters # or \ or | anywhere in the Special file.

    Here is an example:

    LOCK:
    \The following variables are not to be renamed:
    menu_pointer%(
    menu_string$(
    menu_icon%
    icon%,icon_flag%,icon_size%
    \The following routines are not to be renamed
    PROCcreate_menu
    FNmenu_width

    Note: The Special file must always end with a blank line.

  13. After compressing my program which contained assembler listings, the program started giving errors such as "unknown or missing variables" and "Syntax error" when I run it with my assembler extended BASIC.

    Assembler extended BASIC versions which have been patched by utilities such as BasExt or !BAX etc.. allow the BASIC assembler to recognise more assembler mnemonics and new instructions. A BASIC assembler listing compressed with StrongBS might not work with such patched version of BASIC simply because StrongBS does not take the new instructions into consideration when, say, removing spaces between opcodes and operands in an instruction. Here is an example:

    LDR share,[top]

    StrongBS will compress this by removing the unnecessary space:

    LDRshare,[top]

    This is fine for the BASIC assembler, but not for the Extended BASIC assembler. The Extended BASIC assembler will think that the instruction means: LDRsh are,[top]. LDRSH is a valid ARM Architecture v4 instruction which BASIC does not yet support.

  14. I want StrongBS to always point at my BASIC library files and list them in the "Library Files" menu.

    StrongBS will normally list all files contained its own directory called "Library". If you want it to point at your own library files stored somewhere else on the disc, do the following:

    1. Load the !Run file that comes with StrongBS into your text editor.
    2. Find the line which says: SET StrongBS$Library .Library
    3. Change this line so that it points at your own library directory. For example: if your library files are stored in the directory "ADFS::HardDisc4.$.Programs.Libraries", then change the line to read: SET StrongBS$Library ADFS::HardDisc4.$.Programs.Libraries
    4. Save the new modified !Run file back.
    5. Quit and re-start StrongBS.
    6. Now the first 64 files in your library directory will be listed in the "Library Files" menu.
  15. I want StrongBS to automatically link my library files when I load in a specific BASIC program to squash, i.e. I don't want it to do that for all my BASIC program.

    Using the Special file called "SBSMake" you can customise StrongBS so that it performs certain operations on the loaded BASIC file and only that BASIC file. Assuming that your particular library files are stored in the directory "$.Programs.Libraries", create a text file and call it "SBSMake". Type the following in the text file:

    SBSLinkDir: $.Programs.Libraries

    now save this file to the directory where your main BASIC program resides. Any time you load your file, the SBSMake file gets automatically loaded and ALL files pointed by the "SBSLinkDir:" will be automatically loaded and appended to the core BASIC program.

    Notes:(1) If you have selected any files from the "Library Files" menu, these will also be appended.
    (2) The "SBSMake" file can contain list of variables and procedure names that you don't want renamed, in this case you can use the "Lock:" token to do that.