Programmer’s Corner – Pilot Revisited Part 1 of 3

Over the years, there have been many programming languages, which have come and gone, sometimes in the blink of an eye. However, one programming language which has has a nice long legacy and continues to be used on some platforms today is the simple language Pilot. The language itself has come in several flavors over the years, both in full-blown compiler size and the mini size.

N. Dealy programmed one of the first versions of Mini-Pilot in 1978. Scott Knaster did one of the first versions of Mini-Pilot for the Apple computer in 1978(See Listing 1). In the February 1981 issue of Creative Computing, Chuck Carpenter provided his rendition of Mini-Pilot, which was again a scaled down version of pilot for the Apple II.

page28image25686624

Apple Computer Inc. discovered the language in 1981 and did their first rendition, which was fairly complex. Apple did an additional version in 1984 called Super Pilot. Both of these are very useful programming tools, which are still in use in some schools even today.

My own version, which I called Appilot/W1, was done in December 1982 while I was in Michigan. Originally I wrote the program for the IBM 370 and then migrated the program to the Apple about 1 month after the IBM version was completed. While the version I wrote was efficient, it was still relatively simple and not quite on the scale of the Apple Computer version. However, with almost any programming language and interpreter or compiler, portability from one platform to another is always a primary concern for the author of the program.

While the Pilot programming language is not that complex, the language is very useful to those teachers who wish to write a simple program for

children to interact with the computer in a simple yet efficient manner. The programming language can be specified in Bachus-Naur Form (BNF). These means that the programming language could be transported quite easily from the Apple to the IBM and vice versa or to any other platform, which you wish to transport it to.

With this article series, we have provided source listings for Scott Knaster’s and Chuck Carpenter’s versions of the program and a complete documentation of what each program does and how to use it. While the programs are a bit dated, they are good examples of how to write an interpreter on a small scale. The Appilot/W1 updated version will be included in the September issue of Call-A.P.P.L.E. magazine in part 3 of the series. So without further delay, lets get into the meat of the programs.

Very Tiny Pilot By Scott Knaster

This version of Pilot was originally written by Scott Knaster and provided to A.P.P.L.E. in 1978 and was included in the A.P.P.L.E. public domain library floppy number 1 (PDS001). This program was not only small but also very efficient with the whole program fitting into less than 4K. In the days in which it was written, this type of efficiency was important as many people with Apple’s only had 16K and people with other computers sometimes only had 4K or 8K in their machines.

While Scott was a bit nervous about the fact that the program was his first interpreter, it was actually a fairly solid piece of code. The fact that the program integrated both the editor and the interpreter into the amount of code that it did was a feat of programming in its day.

The edit mode of the program is fairly straightforward and simplified for the user. You enter the editor with the N command and then exit it with a double ENTER press.

While the Pilot commands which you can use are only T, A, M and the Y/N Boolean delimiters, this is all that is really necessary to write a simple question/answer program.

This program definitely is an amazing example of how to write good short programs that do exactly what they are meant to do. The total number of lines in the program is 91 but considering that the program has build in help, that would have cut down the program to about 2K total for the entire thing.

page29image25430464
page29image25435040

While the program does have a rather small range, do not under estimate the power of the program. That particular aspect is one of its most attractive features. The program can be modified to handle more lines just by changing the dim statements from 1000 to whatever number you want.

The only drawback to the original program is the lack of a save function for storing your programs. However, this can be added fairly easily as can many other required modifications.

The program is completely self-contained and is effective for showing the techniques but the usefulness is fairly limited due to the lack of commands in the program.

Author: Bill Martens
A.P.P.L.E. Chairman of the Board and Club president -- Bill worked for the founder, Val J. Golding and A.P.P.L.E. from 1981 to 1982. In 1999, he began archiving the materials which were distributed and sold by A.P.P.L.E.. That project led to the group that remained of A.P.P.L.E. Bill was involved in the financial industry in Tokyo and has over 20 major office infrastructure projects to his name. In March 2001, he retired to write books and to spend more time pursuing personal interests. As the president of the users group, Bill is in charge of distribution of Call-A.P.P.L.E. magazine as well as the organization of this web site. Bill currently resides in Tokyo, Japan and Shelton, Wa splitting time between the places.