Review by Richard Mansfield
This program can transform any BASIC program into a compiled version that RUNs far faster. For any 4000 or 8000 series models, 4.0 BASIC, except the 8096. There is a version for the new Commodore 64 as well.
I have a version of the game "Othello," in BASIC, which is several years old. It's a good opponent, but I avoided playing it very often because it would take so long to figure out its move. After I made a move, a cursor would appear and slowly travel to each square on the board, in an infuriatingly leisurely way. It was like playing with someone who gently put a finger on each square before making a move in checkers.
After it was transformed with Petspeed, an optimizing compiler sold by Small Systems engineering, it became a far faster player. Now the cursor flies across the squares in a most computer-like fashion, making up its mind much more quickly than I ever could, as nature intended.
A compiler takes an ordinary BASIC program and creates a second, faster version. The new program is either in machine language or a special machine-language-like code. In either case, the goal is to create a highly efficient program that will RUN far more rapidly.
Petspeed succeeds. Depending on the nature of the program, Petspeed can RUN up to 40 times the speed of ordinary PET BASIC. The following simple benchmark took four minutes and one second to RUN in BASIC. The Petspeed version took one minute, 33 seconds.
10 TI$ = "000000"
20 FOR I = 1 To 50000
30 X = X + 1
40 NEXT I
50 PRINT TI$
In operation, Petspeed uses a dual disk drive with the target program on a disk (4000 or 8000 series, BASIC 4.0) in Drive One and the special Petspeed disk in Drive Zero. It takes over the computer and asks you just one question: what is the filename of your BASIC program? Then, for about 3 1/2 minutes it builds a new version on Drive One in a pseudo-code called "Speedcode" which, when RUN, is used by a pseudo machine. In essence, a compiled program is appended to a special "interpreter" program, 8K long, which is loaded into RAM with it. This pseudo machine takes control when you type RUN to use the compiled program.
The compiled program RUNs like a machine language program. If you LIST it, all you see is: "10 SYS (1040) COMPILED IN PETSPEED." The STOP key is disabled (though you can enable it by putting an Enable-Stop instruction in the BASIC program: 10 REM ! ES). You can't use DIM A(N). The N must be a number so the compiler can know in advance how much space to reserve. Since it's no longer BASIC, there is no point to the words RUN or LIST appearing within the program and they, too, are disallowed. These are the only restrictions, however.