TURTLE

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 CMM2

Syntax:
TURTLE 

Description:
The TURTLE commands are a simple method of drawing graphic images on the VGA screen. 
They are suitable for newcomers and students.

TURTLE RESET Clears the screen and re-initialises the turtle system. The turtle is located at MM.HRES\2, MM.VRES\2. 
The default pen colour is white and the fill colour is green. The initial heading is up (0 degrees)
TURTLE DRAW TURTLE Draws a turtle at the current location and in the current orientation
TURTLE DRAW PIXEL x, y Draw a 1-pixel dot at the given location using the current draw colour, regardless of current turtle location or pen status.
TURTLE FILL PIXEL x, y Draw a 1-pixel dot at the given location using the current fill colour, regardless of current turtle location or pen status.
TURTLE DRAW LINE x1, y1, x2, y2 Draw a straight line between the given coordinates, regardless of current turtle location or pen status.
TURTLE DRAW CIRCLE x, y, r Draw a circle at the given coordinates with the given radius, regardless of current turtle location or pen status.
TURTLE PEN UP Lifts the pen so moves do not write to the screen
TURTLE PEN DOWN Lowers the pen so moves do write to the screen
TURTLE FORWARD n Moves the turtle n pixels in the current heading
TURTLE BACKWARD n Moves the turtle n pixels opposite the current heading
TURTLE DOT Draw a 1-pixel dot at the current location, regardless of pen status
TURTLE TURN LEFT deg Turn the turtle to the left (anti-clockwise) by the specified number of degrees.
TURTLE TURN RIGHT deg Turn the turtle to the right (clockwise) by the specified number of degrees.
TURTLE BEGIN FILL Start filling. Call this before drawing a polygon to activate the bookkeeping required to run the filling algorithm later.
TURTLE END FILL End filling. Call this after drawing a polygon to trigger the fill algorithm. The filled polygon may have up to 128 sides.
TURTLE HEADING deg Rotate the turtle to the given absolute heading (in degrees). 0 degrees means facing straight up. 90 degrees means facing to the right.
TURTLE PEN COLOUR col Set the current drawing colour. Colours are specified as per normal drawing commands
TURTLE FILL COLOUR col Set the current fill colour. Colours are specified as per normal drawing commands
TURTLE MOVE x, y Move the turtle to the specified location, drawing a straight line if the pen is down.

 

Last edited: 29 September, 2020