Author: <Fernando Kempston>
Category: <Christmas Challenge>
System: <Jupiter ACE>
Language: <FORTH>
Len source code: <405 bytes>
Len code: <295 bytes>
Instructions:
Install SpudACE emulator.
Method #1:
File -> Load Spool File
load "ACE-Xmas.txt" (without quotes)
type "nb" (without quotes) press ENTER
Method #2 (snapshot):
File -> Load File
load "challenge.ace" (without quotes)
type "nb" (without quotes) press ENTER
Description:
< GO is a word that takes a number from the stack and TABs the
print position (as in BASIC).
ST prints a star.
SST prints 2 stars with as many spaces between them as the
number put on the stack.
Divide each diamond into two triangles. The upper half
consist of a row with just one star and three with two stars
separated by 1,3,5 spaces.
Each A1...A4 words print one row of the diamond.
the final word NB prints all diamonds from top to bottom.
After that, a loop waits for a key to be pressed.
Beautiful ! >
Comments: There are no executable files in FORTH.
It is a language but also an OS. FORTH has to be present
to run FORTH programs. A FORTH program is made of words (subs)
that are added into a dictionary. To calculate the length of my
code I use the FORTH word HERE to know the address of the
next free space in the dictionary available for the user code.
Then again after I've added my word definitions.
I'm not a programmer, but I love the FORTH language
in the 8 bits machines. Couldn't resist the challenge!