%OP%TNT %OP%BON %OP%PL64 %OP%TM1 %OP%BM1 %OP%LM5 %OP%HE/%H2%Z88 Users' Club Software Library%H2%/ %OP%FO/%H2%Z178%H2%//@P@/ %OP%DEZBASOPT - Z88 BASIC Program Optimizer Users Documentation %CO:A,5,70%%C%%H2%@T%H2% %C%%H4%Version 1.00 - Copyright 1990 Richard Haw%H4% %H1%Introduction:%H1% %H1%Disclaimer:%H1% %H1%Distribution%H1% %H1%Using ZBASOPT:%H1% %P0% %H1%Updates:%H1% %CO:B,5,65% ZBASOPT is a utility to reduce the size of Z88 BASIC programs. The program achieves this by removing comments and string substitution to reduce variable name lengths. In addition, the string substitution feature can be used to assign letters with variable starting letters, improving execution speed. (Z88 Basic uses a table lookup based on the first letter of a variable name, but then must search all variables starting with that letter sequentially, optimal performance is thus obtained when the variables all start with differing letters). This program and all documentation is provided as is, without any warranty either expressed or implied, including but not limited to implied warranties of merchantability and fitness for a particular purpose. In no event shall the author be liable for any loss of profit or other damage caused by the use or misuse of the program, including but not limited to special, incidental, consequential or other damages. This program is copyright 1990 by Richard C. Haw, all rights reserved. It may be freely copied and distributed so long as the original documentation is distributed with the program and no fee is charged for the program other than normal on-line charges for dial-up systems or a distribution medium fee not to exceed $5.00 (US) for manual distribution. The operation of the program is very straight forward, when run the program will ask for a program name. It assumes that the name of the input program is as specified, with the extension .BAS and generates a compacted program with the extension .BA1. The input file %H2%MUST%H2% be in tokenized format (ie. %H2%SAVE%H2%d from BASIC, not in a .CLI form). The program will look for a string substitution file with the given input name and the extension .SUB. If found this file will be read in and used all occurences in the input program will be substituted. The format of the .SUB file is the source form of the string, followed by a TAB, and the output form of the string. (ie. two columns, saved from Pipedream with the 'save plain text' set to yes). The program %H2%will%H2% recognize PROC and FN statments as BASIC commands. These are the only situations where the strings do not have to unique. (ie. PROCBOLD will %H2%not%H2% be confused with the string PROCBOLD). This program is very simplistic, it simply replaces all strings with their reduced form (aside from the afore mentioned PROC and FNs), and removes all comment lines. For this reason the user must take care that the strings which are to be substituted are unique, and that %H2%NO%H2% branches are made to comment lines, since the program does not check to see if there are branches to the comments which are removed. The latest version of this program can be found on the Genie commercial timeshare service in the laptops forum. Any questions or comments on the program can be emailed to R.HAW1. %CO:C,5,70%%CO:D,5,65%%CO:E,60,60%