DRAWING PICTURES on the television screen may not be new but this program is written in Forth to run on the Jupiter Ace so it has a different structure to Basic drawing programs. The program enables straight and diagonal lines to be drawn and rubbed out on the screen.
Load the program from the cassette by entering "load drawer" The program may then run by entering "drawer"
The keys around the G key control flashing cursor as shown below:
R T y
F G H
V B N
If T, H, B, and F are North, East, South and West respectively, then R, Y, N and V are NW, NE,SE, and SW. The cursor may be switched between drawing and rubbing out modes by pressing O.
This program uses the plot function on the Ace. This function requires three numbers on the stack, the X co-ordinate, the Y co-ordinate and the Plotting mode. The other words in the program test to see if any of the keys specified have been pressed and alter the values of X,Y, and the Colour appropriately. One interesting aspect is the method of testing to see if a key has been pressed and then leaving the result as a flag on the stack. The position of the cursor is then tested to see if movement in the desired direction will take it off the edge of the screen; this result is also saved on the stack. The flags on the stack are then tested using the And function, if true, then the X and Y co-ordinates are changed accordingly.