home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / d / drwimp / DrWimp / Utils / !BSquasher / ReadMe < prev    next >
Encoding:
Text File  |  1994-05-06  |  6.1 KB  |  182 lines

  1. !BSquasher  Version 1.18 © Mohsen Alshayef 1993 1994
  2.  
  3.  
  4. Note:
  5. =====
  6.  
  7.    This is a beta version with some facilities not yet completed (e.g. the protection
  8.    option).
  9.  
  10.    There many options being worked on. This version gives you a taste of the program
  11.    and does not show off all its capabilities.
  12.  
  13.  
  14. Who is it for?
  15. ==============
  16.  
  17. It is made for all BASIC prgrammers who want to distribute their programs in BASIC, without
  18. having others modify or understand what is happening in the program.
  19.  
  20. It is a very big advantage for lazy programmers who do not have a good programming style but
  21. are able to make working programs.
  22.  
  23. !BSquasher is a utility program that allows you to compress basic programs while
  24. still allowing the program to run correctly.
  25.  
  26. !BSquasher uses many techniques and alogrethims some which have never been used before.
  27. The goal of all of this is to provide the following advantages on the result program:
  28.   - Programs take less space on disc,
  29.   - are slightly faster to load from disc.
  30.   - take up less memory once loaded.
  31.   - are difficult to hack and modify.
  32.   - run slightly faster becasue there is less program to scan through for any calls.
  33.   
  34.   
  35. What does it do?
  36. ================
  37.  
  38. Well, it basically compresses BASIC programs. Is that enough for an answer? I don't think so.
  39. There are many similar utilities available, many are in the form of Public Domain and some
  40. are in Shareware form.
  41. I have come across many and have used many going back to similar utilites on the old BBC micros.
  42. But, !BSquasher is all different.
  43.  
  44. What is special about BASIC Squasher?
  45. =====================================
  46.  
  47. The goal of compressing BASIC program is to achieve two things (may be more); reduction in
  48. size (and hence speed of execution), and making program very difficult to understand and
  49. modify.
  50.  
  51. BASIC Squasher addresses each goal differently and in a unique way.
  52. There are currently no BASIC squashing utilities that achieve the compression ratio achieved
  53. with !BSquasher.
  54.  
  55. The only proof is to try it out and compare it with other compression utilities that you use.
  56.  
  57. !BSquasher is built around many modules (total of 34). This means 34 different methods of
  58. data compression and space saving alogrethims.
  59. I have opted to go this approach in order to make the program easily modifiable. In fact I
  60. am looking forward to get my hands on the new BBC BASIC version which comes with RISC OS 4.
  61. Upgrading the software will be very easy indeed.
  62.  
  63. How to use the application?
  64. ===========================
  65.  
  66. Once installed, drag a BASIC file onto the !BSquasher icon or its window. Only valid BASIC
  67. programs are allowed.
  68. Select the "Squash" icon and there you go. It can't be simpler.
  69.  
  70. When compression is finished, drag the result file to an open directory window to save it.
  71.  
  72. Why no options?
  73. ===============
  74.  
  75. The aim of a BASIC compression program is to generate the smallest possible program size. My
  76. experience has shown that even when compression options are provided, the user will choose to
  77. select ALL options.
  78. Please let me know if you think an OPTION menu is necessary. You must have very strong points to
  79. make me provide one.
  80.  
  81. Nested compressions:
  82. ====================
  83.  
  84. Once compression is finished you can drag the result file into itself to obtain further reduction
  85. in size. This is only minor (few bytes saving).
  86.  
  87. Error messages:
  88. ===============
  89.  
  90. Assembly listing generated too long BASIC line
  91. ----------------------------------------------
  92. This error will be encountered if you are compressing a program which is already compressed.
  93.  
  94. Fatal Error. Result file is expanding:
  95. --------------------------------------
  96. This is a failure of !BSquasher.
  97. This error should not be seen under normal operation.
  98.  
  99.  
  100. Functions provided by !BSquasher:
  101.   
  102.    1. Removes REMark lines
  103.    2. Removes LET statements
  104.    3. Converts numbers into shortest forms
  105.    4. Removs unnecessary spaces
  106.    5. Converts Poke and Peek keywords
  107.    6. Converts into TRUE token
  108.    7. Removes unneccary THEN statements
  109.    8. Converts ASC tokens
  110.    9. Converts SYS and SWI names into numbers
  111.   10. Renames variables
  112.   11. Renames procedures and functions
  113.   12. Converts register names in assembly listings
  114.   13. Removes unneccary WHEN
  115.   14. Converts CHR$
  116.   15. Concatenate lines
  117.   16. Concatenate DIM
  118.   17. Concatenate LOCAL
  119.   18. Joins strings
  120.   19. Converts into SPC
  121.   20. Evaluates numbers
  122.   21. Removes unnecassary brackets
  123.   22. Converts real numbers
  124.   23. Concatenate IF THEN ELSE multi-lines
  125.   24. Removes garbage lines
  126.  
  127.  
  128. There is only one thing !BSquasher can not cope with (yet); the EVAL function.
  129.  
  130.  
  131. Line Numbers:
  132. =============
  133.  
  134. !BSquasher can cope very easily with line numbers. However, if you use line numbers in a
  135. program (there should be very few situations where you have to), they should be simple
  136. line numbers in the range of 0 to 65279, not expressions. Otherwise, if the program is
  137. renumbered (!BSquasher does not renumber your program), it will stop working since BASIC
  138. does not know how to change the expression in the right way.
  139.  
  140. This line numbering also applies to RESTORE statements.
  141.  
  142. !BSquasher will cope with GOTO <line number>, GOSUB <line number>, RESTORE <line number>.
  143.  
  144. The RESTORE+<offset> statement should have no expressions assigned to Offset. Line numbers
  145. and number offsets are allowed.
  146.  
  147. The RESTORE+<Offset number> will be replaced with RESTORE +0.
  148.  
  149.  
  150. The Protection facility:
  151. ========================
  152.  
  153. This is not yet fully implemented.
  154.  
  155.  
  156.  
  157.                                      !!!!! Warning !!!!!
  158.                                      ===================
  159.  
  160.   Do not use text editors to modify a compressed BASIC program. This will corrupt the program.
  161.   Always keep a copy of the original un-compressed program.
  162.   
  163. -------------------------------------
  164.                                        
  165. Please write to me on:
  166.   
  167.   Mohsen Alshayef,
  168.   PO Box 80647,
  169.   AL-Wakrah,
  170.   State of QATAR,
  171.   The Arabian Gulf                                       
  172.   
  173.   for any bugs, corrections, modifications, suggestions, etc.
  174.   
  175.   If your final compressed program failed to run at a particular line then please inform me
  176.   about the original and compressed line contents.
  177.   
  178.   
  179. Best Regards
  180.  
  181. Mohsen Alshayef
  182.