ROM Computer Magazine Archive ROM MAGAZINE ISSUE 1 — AUGUST/SEPTEMBER 1983 / PAGE 12

JUMPING FORTH
By Peter Ellison
    This section each issue will deal with programming in Forth, but for this first issue only two reviews are written about two packages from Valpar International just to give a short description of an excellent version of 'Forth'. All of the programs in this section will be written in 'Valforth' but most versions of Forth are similar, making the programs in this section applicable to any Forth.

Valforth-"One Heck of a Language"
    Forth for those people who don't know what it is, here is a definition: It is a stack oriented, high level language in which the user adds to the basic kernel of commands by defining words(commands) of his/her won. Forth is very fast because the Forth interpreter is only about 80 bytes compared to Pascal or Basic interpreters which are usually two thousand bytes long. Forth having such a small interpreter executes ten to twenty times faster than other interpreted languages. Machine code can be very easily incorperated into your program using the flexible 6502 assmbler built into Valforth.
    Now that you know what Forth is I will now tell you some of the advantages Valforth has over the other Forth versions. Number one it is very easy to write software for sale because in the Valforth package there is a special defined word called AUTO. This word when used to save your program will run your program when the computer is booted up. No one will be able to get at your program. Another advantage is it supports all player/missile graphics as well as all the graphic modes. Another advantage of Valforth is that it has a choice of two different editors. The first being the regular Fig(Forth Interest Group) as well as the special Valforth 1.0 editor. The Valforth 1.0 editor is actually a stripped down version of the Valforth 1.1 editor which is available on one of the many other user supported disks available from Valpar International. Another excellent thing Valforth offers is the ability to save your favourite system(s) on a disk which when booted up will have all your favourite systems loaded automatically.
    The only bad thing that I can say about Valforth is the documentation. Some of the instructions are not made as clear as they could have been. One was the SAVE command. I had to experiment with that one a bit before I was clear on how it exactly worked. There are a few things different from fig-forth but they are all given at the beginning of the manual supplied with Valforth. Before I bought Valforth I had never programmed in Forth but with the book 'Starting Forth' by Leo Brodie I've been making my way through it quite easily. Its a bit harder then basic but all the time I've spent on it so far has been worth the effort.

Player Missile & Sound Editor for Valforth
    If you haven't read the review of Valforth I suggest you do that before you get too confused by reading this. When I bought this disk for my Valforth I was really suprised how fast and easy it was to move a player around the screen, I nearly screamed because I had spent many hours learning how to make assembly language subroutines to speed up my player and then to find out how easy it was with this package for my Valforth.
    To initialize a player all that is needed is a simple command of PMINIT. To draw a player first you change it to BASE 2(2 BASE!) for conveinence, label it(LABEL PICT), and then draw your player with ones and zeros. Then change it back to base 10 by typing in DECIMAL. Next you must clear the player/missile memory by typing in PMCLR. This wont't leave any junk on the screen if your starting a new player. Next you must turn on the players by typing in ON PLAYERS, Finally to get your player on the screen you type in PICT A B C N BLDPLY. This will build your player wherever you want. A=bytes long, B,C=the position the player is on the screen and, N=0-4 depending on what player you want.
    You will now have a player on the screen at position(B,C). To move it is easier then making it, which was very simple. First you load in the stick utility from the disk and then type in the short program below:
:JOY
   BEGIN
   N STICK
   N PLMV
   ? TERMINAL
   UNTIL ;

    Then type JOY<RTN> and you can use joystick number N to move it all around the screen. The PLMV command can be used to move a player in any direction. To make a multi-color player is very simple because one of the defined words is MCPLY, The way this is done is by combining two or more different players together.
    This disk also has a Character Editor. It allows you to draw a character 8x8 using the joystick and call it back from the disk by using KLOAD. The disk also includes a very excellent sound editor. It allows you to experiment with the four different sound channels within your computer. Each of the four channels are interfaced to one of the four joystick ports, The joysticks allow the setting of the pitch(horizontal) and distortion (vertical) of their corresponding channel. You control the sound of each channel by pressing the button on the joystick. By pressing all four buttons at the same time one is able to find the perfect sound.
    I recommend this disk just for the player/missile part, the rest is a bonus.
These two packages can be purchased from:
Valpar International
3301-E. 34TH Street
Tucson, Arizona
85713