BBS Messages

Intro
Ailanthus Tree: Login | Users | Commands | Messages | Chat | Hang
Magpie BBS: Messages | Users | Commands
Misc BBSes: Aerogram | Bonsai Tree | Mofo | NYCENET | Riverdale | Misc Messages
ASCII Art: Nude | Jane | Femme | Spock | Kirk | Nixon
Game Docs: Archon II | Breakdance | Bruce Lee | Cutthroats | Dallas Quest | Deadline | Flight Sim 2
Hitchhikers Guide | Incredible Hulk | Infidel | Kennedy Approach | Mask of the Sun | M.U.L.E.
Pastfinder | Pinball Construction Set | Raid on Bungeling Bay | Raid over Moscow | Rescue on Fractalus
Seven Cities of Gold | Sonar Search | Spy vs Spy | Whistler's Brother
Util Docs: Blitz Compiler | Designer's Pencil | Easy Script | Kwik-Write | Micromon
Movie Maker | Paperclip | Perspectives | Wordpro 3 Plus/64 | Wolfenstein
Philes: 1541 Alignment | 976 Numbers | Mainframes | Sysops' Bible
Drugs | Knock-Out Drops | Lock Picking | Radar Jamming | Thermite


Blitz Compiler Docs

I've retained the original formatting so you may have to adjust it to get the file to display and/or print correctly. Noisy phone lines caused the occasional glitch or truncated file. I replaced some, but not all, instances of line noise with "[ERROR]" where applicable.

                                 B L I T Z !

Blitz is an easy to use, versatile BASIC compiler, designed to speed up the operation of all your BASIC programs. BLITZ! is fully compatible with the Commodore 64 computer, and has the following features:
    High speed P-Code.
    Small P-Code execution and runtime routines (6k Bytes).
    Extensions to standard Basic (such as VICTREE commands) are recognized            automatically or can be forced.
    Program overlays are possible, and variables can be passed between chained        programs.
    Compiled programs can be protected.

TABLE OF CONTENTS
         Subject                                                                      1. Introduction                                                                 2. Operation
      3. Compiling Options
      4. Program Error Correction
      5. Differences BLITZ!-BASIC

Introduction
Blitz!
High Speed P-Code
BLITZ! translates BASIC program files into a special P-Code. This P-Code is executed much faster than the original program. Moreover, very large BASIC programs become smaller and need less memory and disk capacity after you BLITZ! them.
Faster program execution is a result of the following improvements over the standard Commodore BASIC interpreter:
    Standard BASIC searches through memory for the location of variables and        arrays, and for the destination lines referenced by GOTO, GOSUB, IF-THEN,       and other statements. BLITZ! stores these locations, so no searches are         necessary.
    Numerical constants are conmverted to floating point or integer constants,      as required, during compilation, saving run time conversion.
    Syntax check is done during compilation, not during run time.
    Integer expressions are calculated using true integer arithmetic. (The          standard BASIC interpreter would conmvert them to floating point, do the        arithmetic, then convert them back to integer.)
    Expressions are evaluated using Reverse Polish Notation (RPN), thus             avoiding unnecessary intermediate data storage.

Small P-Code and Runtime Routines
Generally the P-Code produced by BLITZ! will be approximately 60% of the size of the original program. This will vary depending on the type of BASIC commands used, the number of statements per line, and the amount of "remark" statements in the original BASIC program. THe BLITZ! compiler appends to the program about 6k bytes of interpretation and run time routines. Programs that are originally 16k bytes (65 blocks of disk storage) or larger will usually be smaller after compilation.

Extensions
BLITZ! recognizes most extensions to standard BASIC (such as VICTREE commands) itself. Others may be forced by preceding them with a double colon (::). The compiler runtime routines then pass the whole statement to the built in BASIC interpreter.

Overlay
BLITZ! is the first compiler which can translate chained programs and even pass variables between them. Unlike standard BASIC, it allows the calling program to be longer or shorter than the called program. Also, the runtime routines are lonly added to the starting program, saving disk space.


OPERATION
Compiling programs with BLITZ! is a very simple process. Just follow the steps below:
1)  On a good quality blank disk that has been formatted copy the program or programs that you wish to compile. If you are using a single disk drive (1541/2031), there should be at least 300, blicks free left on the disk after all the programs have been copied onto it. If you have two disk drives or a dual disk drive (4040, or 8050 and a SEWperBus  interface), format a second blank disk for your compiled programs.
2)  Place the BLITZ! program disk in you 1541 disk drive and type:
    LOAD "*",8     <RETURN>       The BLITZ! program should load and the                                          "READY" appears on the screen.
    RUN            <RETURN>
3)  After the red light in the disk drive turns off remove the BLITZ! program disk from the disk drive. Insert the previously prepared BASIC program, or programs, to be compiled disk into your 1541 disk drive.
4)  Menu #1 should now appear on the screen:

                                 skyles blitz

         1 = single floppy

         2 = dual drive floppy

         3 = 2 floppies with different addr's

5)  Type:
         1  <RETURN>    If you are using a single disk drive. The screen will                           now ask for the filename of the program you wish to                             compile.
               or
         2  <RETURN>    If you are using a dual disk drive.
               or
         3  <RETURN>    If you are using two single disk drives. You will be                            asked for the device numbers of your source and                                 destination drives. These instructions assume that 9 is                         device number of your destination drive.

6)  If you have a dual disk drvie or 2 single disk drives and select 2 or 3, a second menu should now appear on the screen. It will offer 2 compileing selections as shown below.

                                skyles - blitz
                                  select mode

     1. = one file to drive 1
     
     2. = all files from drive 0 (device 9) to blank diskette in drive 1                  (device 8),      comp - machinecode

     3. = all files from drive 0 (drive 9) to blank diskette in drive 1 (device           8),       but first file with comp - block.

     4. = all files from drive 0 (device 9) to bland diskette in drive 1                  (device 8)       with overlay.  

please select

7)  BLITZ! will now ask for the filename(s) of the files(s) that you wish to have compiled. Type them in. 

8)  If you are using a single disk drvie and select compiling option 1, BLITZ! does to 2 passes to translate the program file.
                                       or
8)  If your setup includes a dual disk drive or two single disk drives BLITZ! will instruct to insert the source disk into the source dirve and press "y". Place a write protect tab on your source disk before you insert it in your source drive. It then instructs you to insert a blank disk into your destination drive. Insert a formatted disk in your destination drive. BLITZ will now proceed to cmopile the program or programs in 2 or 3 passes.

9)  If during compilation BLITZ! encounters an error, it will stop and ask if you want to comtinue. The choices are "Y" for yes and "N" for no. If you have not read the sections on "Program Error Correction" and "Differences BLITZ!-BASIC", now would be an excellent time to do this.



The following is a short description of the compilation process;
First Pass - The program is translated into P-Code. The compiler also checks for SYNTAX and TYPE MISMATCH errors. The line numhbers of the erroneous lines are displayed as they are found. The compiler will complete compilation, but any lines in error must be corrected since they are not translated.
A BAD SUBSCRIPT ERROR will be reported if you change the number of dimensions in an array (i.e. x$(4,2) and later x$(5)). Since it is legal to clear (CLR) the array and redimension it later in the program, this message should be considered a warning only.
OVERFLOW ERROR is displayed whenever a number greater than 1 e38 is found in the program. In this case, a wrong number would be placed in the memory location for that variable.
EXTENSIONS are not considered errors, but are shown as an '?EXTENSION' message together with the corresponding line number.
At the end of pass 1, all multidimensional arrays are checked. If any of these are not declared by a DIM statement, the message BAD SUBSCRIPT ERROR OF <arrayname> is printed. A 1-dimensional array with no corresponding DIM statement defaults to 11 elements as they would in standard BASIC.

Pass Two - At this point, BLITZ! replaces all variable and line references with their exact locations in memory. If at this time a previously referenced line is still unknown, the error UNDEFINED STATEMENT IN <line number> is displayed.
The compiled program is now built up from the following parts.
        runtime routines.
        data statements as found in the whole program.
        P-Code (your actual program)
        table of variables.



COMPILING OPTIONS
Option 1 - Compiles one program from the source diskette onto the destination diskette. If you have a single drive system the source and destination diskette are the same disk. The compiler prefixes the file name with 'c/' to mark the compiled program. Another file with the prefix 'z/' contains the cross reference to the line numbers in the original program. (see DEBUGGING)
During compilation BLITZ! uses two other files (prefix 'p/' and 'd/') which hold the pure P-Code and DATA. These files will be scratched before the end of pass 2.
Option 2 - Compiles all files on the diskette onto the diskette. The runtime routines are added to all programs compiled. No cross reference files are created when using this option. If an error occurs during runtime the program should be compiled using option 1 to produce the cross reference.
Example       Drive 0    program a
             (Device 9)  program b
                         program c

results in:   Drive 1    program a
             (Device 8)  program b
                         program c

Option 3 - Compiles all programs from the diskette onto the diskette. Runtime routines are added to the first program only. No variable passing between the modules is possible. No cross reference files are created. If an error occurs during runtime the program should be compiled using option 1 to produce the cross reference.
This option has the following advantages:
* Shorter loading time for chained programs.
* Less disk storage needed.
* Only the first program can be loaded and run. This can be used as a form of program protection.

Option 4 - Compiles all programs from the diskette onto the diskette. Full variable passing between chained programs is possible. No cross reference files are created. If an error occurs during runtime the program should be compiled using option 1 to produce the cross reference. 
In this option BLITZ! collects all variables and arrays during an additional pass. The starting program, if shorter than the others, is lengthened to the size of the longest program. The starting program is stored with the table of variables of all programs as well as the runtime routines and the P-Code for itself.
You should notice the following restrictions:
All arrays should be declared (with DIM statements) at least in the program that references them first. If this is not done, BLITZ! will tell you it has found a BAD SUBSCRIPT ERROR.
No reloading of the starting program is possible or all variables will be lost. If it is required to restart the first program during runtime, save that program twice on the source disk with different names and call the second one of these during runtime.
Example :
source disk        start
                   program a
                   program b
                   program c
                   start 2

In this example, it is necessary to be able to call all programs beginning with 'program' from the program named 'start'. It is also necessary to call the starting program from one of the called programs.
destination disk   start
                   program a
                   program b
                   program c
                   start 2

'start' must be loaded and run first, it can then call program a, program b, or program c. Also, program a, program b, or program c can call start 2. Start 2 is the original program without the runtime routines, or table of variables added.



PROGRAM ERROR CORRECTION
BLITZ! will not make you a better programmer. BASIC was developed to introduce people to computer programming. It was intentionally made as an "interpretive" program with maximum of error messages to assist program correction. To assist your program development, Skyles Electric Works produces and sells and outstanding BASIC program development cartridge called VICTREE> VICTREE model VT64X is specifically made for the Commodore 64. It contains 15 powerful BASIC program development and correction aids. If you are writing BASIC programs, purchase VICTREE (model VT64X) before your purchase BLITZ!.
BLITZ! will not make a better program from a poorly written public domain or commercial program. Additionally,m all compiled programs require explicit array dimension statements and a different method of attaching machine language subroutines to the original BASIC program. BLITZ! is not recommended for comverting "protected" programs to " unprotected" programs. A well written "protected" program will at best become a faster "protected" program.

BLITZ!, during compilation, checks for the following errors:
         SYNTAX ERROR
         TYPE MISMATCH ERROR
         UNDEFINED STATEMENT ERROR
All other errors are logic errors (bugs) which occur during runtime. Since the compiler discards all line numbers, the runtime routines show any error together with the contents of its own program counter. The cross reference file (z/test) created hby compiling with option 1 may be used to find the corresponding line number within the original BASIC program.
Example:
You have just run the program 'c/test' and the computer has replied with 'ILLEGAL QUANTITY ERROR IN 5912'. You should type:
         LOAD "z/test",8     <RETURN>  After the file loads, type:

         LIST -5912          <RETURN>  It will list to counter number 5912

If the last line printed is:

5909=520

You now know that line 520 in the source program caused the error. Make the appropriate changes and compile the program again. This may seem complicated, but keep in mind that compilation should be the last step in program development.
Since the standard BASIC program and the compiled program produce the same results, you should use the built in BASIC interpreter and a VICTREE, model VT64X, cartridge to write and correct the program.


 DIFFERENCES BLITZ! - BASIC
STOP KEY:
BLITZ! disables the stop key after RUN, LOAD, and CLR. There are two special remark statements which enable and disable the STOP key during program execution:
         REM ** SE           STOP key enabled, and:
         REM ** SA        $  STOP key disabled.

CONTINUE - The use of CONT after a program break is not allowed. You must use a SYS command to continue program execution.
INTEGER ARITHMETIC - BLITZ! uses true integer arithmetic whenever this is possible. This provides imporvements in execution time, but doesn't change the results of these calculations. 
FUNCTIONS - try this example, type:
              PRINT PEEK (145)     <RETURN>       This prints the contents of                                                     location 145.
              PRINT PEEK (145/3*3) <RETURN>       This prints the contents of                                                     location 144!
              A=145/3*3            <RETURN>       This prints the contents of                                                     location 145.

This problem is generated by the BASIC interpreter using different rounding procedures in assigning variables and during parameter evaluation. These sorts of errors occur in conjunction with the BASIC functions PEEK(Ü), INT(X), and with with statments POKE, WAIT, and SYS and with array index calculations. BLITZ! does all rounding using the same procedure, so in the example above all lines would print the contents of location 145.
ARRAYS - Arrays with more than one dimension must be defined explicitly (in BASIC they would default to 11 elements in each dimension). Arrays with only one dimension will default to 11 elements if they are not defined explicitly, just as in standard BASIC. Since problems could arise with the use of implicit 'DIM' statements, repeated 'DIM' and 'CLR' statements, it is  recommended that all arrays be defined explicitly. The VICTREE model VT64X from Skyles Electric Works has a 'CHANGE' function that can be of a great amount of help in modifying existing BASIC programs. BLITZ! builds a speacial array with the normally illegal name 'z*%'. 
This array contains a 5 byte header and a series fo 2 byte pointers to each array found in the original BASIC program.
FOR-NEXT - It is possible with progvams compiled with BLITZ! to write FOR-NEXT loops using integer variables, to speed up your programs even further. SInce this is an illegal programming practice in standard BASIC, such programs would cause a SYNTAX ERROR when testing. To alleviate this problem it is recommended you use the following procedures:
source program statement     FOR I=1 TO 100:I%=I:A(I%)=0:NEXT
                             (this will run in BASIC)

compiled program statement   FOR I%=1 TO 100:A(I%)=0:NEXT
                    $        (this should be replaced just before compilation,                               VICTREE's "CHANGE" command is excellent for this.)

Overhead - Programs compiled with BLITZ! use less overhead on variables than the standard BASIC interpreter:
         Command        Basic          BLITZ!
         GOSUB          5 bytes        3 bytes
         FOR            18 bytes       16 bytes
         FOR            illegal        9 bytes
      (with integer)
This enables you to construct programs with more gomplicated nesting structures. However they may cause an 'OUT OF MEMORY ERROR' when executed with standard BASIC.

    WALKTHRU BY: DOC'S "R" US BBS

Intro
Ailanthus Tree: Login | Users | Commands | Messages | Chat | Hang
Magpie BBS: Messages | Users | Commands
Misc BBSes: Aerogram | Bonsai Tree | Mofo | NYCENET | Riverdale | Misc Messages
ASCII Art: Nude | Jane | Femme | Spock | Kirk | Nixon
Game Docs: Archon II | Breakdance | Bruce Lee | Cutthroats | Dallas Quest | Deadline | Flight Sim 2
Hitchhikers Guide | Incredible Hulk | Infidel | Kennedy Approach | Mask of the Sun | M.U.L.E.
Pastfinder | Pinball Construction Set | Raid on Bungeling Bay | Raid over Moscow | Rescue on Fractalus
Seven Cities of Gold | Sonar Search | Spy vs Spy | Whistler's Brother
Util Docs: Blitz Compiler | Designer's Pencil | Easy Script | Kwik-Write | Micromon
Movie Maker | Paperclip | Perspectives | Wordpro 3 Plus/64 | Wolfenstein
Philes: 1541 Alignment | 976 Numbers | Mainframes | Sysops' Bible
Drugs | Knock-Out Drops | Lock Picking | Radar Jamming | Thermite


Return to Kim Moser's Generic Home Page.
Copyright © 2024 by Kim Moser (email)
Last modified: Fri 02 February 2007 18:23:42