THIS PROGRAM is written in Jupiter Ace Forth. It is entitled Millipede and is based upon a program written by Andrew Weekes in Spectrum Basic published in Your Computer, February 1983. As there is a shortage of Ace Forth software I hope Mr Weekes will not mind my using his algorithm.
I have tried to use descriptive colon definition names in an endeavour to make the coding self-explanatory. However, this is at the expense of memory and is not strictly necessary. The program as it stands occupies approximately 2K, 4 bytes, and requires a memory expansion to the Ace - I use a converted ZX-81 RAM pack. It may be possible, by cutting out the frills, to reduce the memory requirement and still have a playable game using the standard RAM only.
In the colon definition Once-More the word Millipede is used. At the time Once-More is being defined Millipede does not exist in the vocabulary. Therefore, it is necessary to define Once-More omitting Millipede and then when all the program has been typed in, edit Once-More putting Millipede in its correct position and then redefine Once-More. Anyone who has used the Ace for a short time will understand the procedure. A similar situation - recursion - is covered in the Ace manual chapter 3,exercise 7, page 53.
One interesting definition which I think is not covered in the Ace manual and which could be useful elsewhere is Screen-Peek. This colon definition expects the stack to contain the row,column print-head position and returns with the ASCII value of the character at the print-head position on top of the stack.
|