I’m sure that many of you have heard rumblings or seen ads for a new computer language called “FORTH,” and are wondering what this is all about. The claims made for it are quite impressive; FORTH enthusiasts are almost evangelical in getting this tool known and used. Three versions (that I know of) exist for the ZX81/TS1000/1500 – “X-FORTH,” “ZXFORTH,” and “TREE-FORTH.” It is not our goal here to provide comparative reviews of these, as I’m a rank neophyte myself and wouldn’t know how to use them, let alone compare them, Instead, we are presenting an article by Gary Smith of Hawg Wild Software. Hawg Wild is the distributor of “X-FORTH” for the T/S machines, as well as FORTH and other products for other machines as VIC, ATARI, etc. More will follow about Hawg Wild after the article, along with further info on how to get into FORTH.
Software is a notoriously elusive “substance;” whoever coined the phrase “nailing jelly to a tree” to describe computer programming had the right idea. Even BASIC programs can be quite “slippery,” as anyone who has written such programs will attest. Assembly language programming (“machine code”) is far more slippery. It is the job of any computer language or operating system to translate commands and operations from human concepts to the maddeningly simplistic commands the CPU acts on. Result: high-level languages are easier to program, de-bug, and modify than “direct” or low-level assembly.
You probably already know the bad news, High level languages (e.g. ZX81 BASIC) are terribly slow; the computer usually has to spend more time figuring out what you want to do, than actually doing it. Timex/Sinclair BASIC, like the other BASICs allowing direct commands, is “interpretive”; the translation to machine-code is done as the program runs, and each program line is first interpreted, then executed. A significant improvement is to use a compiler to first translate your BASIC code to machine-code (usually destroying the BASIC in the process). While being very useful for some jobs, compilers have serious drawbacks for others; the final (object) code is difficult to modify, you have to LOAD the original source code (BASIC), modify and re-~compile, Also, BASIC programs usually have to be changed to suit the quirks of a particular compiler, There are none that I know of that include floating point numbers, transcendental functions, and other nice features of Sinclair BASIC. Finally, while more compact than high-level BASIC, compiled programs generally take up more space than efficiently-coded assembly.
This is partially due to the fact that compiled BASIC is still structured like BASIC, i.e. in “human” terms. If a language were structured more along the lines of how the CPU “thinks,” we could presumably write faster, shorter programs. If we could also define new operations or “words” as we go along, we’d REALLY have something, FORTH is such a language. You more or less “meet the computer halfway” and have to become familiar with how the stack works, using post-fix notation, and other concepts. In exchange, you are allowed unlimited flexibility in defining new operations. In a way, then, each program is written in a language exactly suited to that problem. You get assembly-level flexibility without its “slipperyness” and debugging hassles.
This article was originally published by Chet Lambert’s Computer Trader (1704 Sam Drive, Birmingham, AL 35235) and is reprinted here with the author’s permission. The Computer Trader is perhaps the first “grass-roots” computer publication, and certainly one of the more successful ones. It is definitely worth the $15 per year (12 iss.) subs. rate, and supplies excellent info on a wide variety of computer topics. It’s gratifying to note that recent issues have included more material on “our” machines, especially as regards hardware mods. Gary Smith is a frequent contributor, his column “Rnd Thoughts” contains frequent attention to ZX/TS machines,