EhBASIC68 language reference by Lee Davison
[Back]
Introduction
This language reference will only refer to those commands which differ from, or are in addition to, those in the main EhBASIC68 language reference.
Notes on graphic commands
Co-ordinatesIn all instances X and Y co-ordinate values may vary from -32768 to +32767. Attempting to use values outside this range will cause a function call error. Only parts of a structure that appear within the visible window, (0,0) to (639,479), will be drawn.
Colour values
Colour values are longword integers and are interpreted as follows ..
Bits 31 to 24 Bits 23 to 16 Bits 15 to 8 Bits 7 to 0 Ignored Blue value Green value Red value As bits 31 to 24 are ignored -ve values may be used where convenient. E.g. you could use -1 instead of $FFFFFF for white.
BASIC Keywords
Here is a list of EASy68k BASIC keywords. Keywords are only valid when entered in upper case as shown, spaces may not be included in them. So, for example, GOTO would be a valid keyword but GO TO would not.
ELLIPSE ELLIPSEF FILL LINE LOAD MODE MOVE POINT POINT() RECT RECTF SAVE SIZE TI
BASIC Commands
ELLIPSE [<exprX1>,<exprY1>,<exprX2>,<exprY2>][,][<exprLC>[,<exprFC>]]BASIC FunctionsDraws an unfilled ellipse bounded by the rectangle defined by exprX1 and exprX2, for the X axis, and exprY1 and exprY2, for the Y axis, of colour exprLC. The width of the line used to draw the ellipse is set by the SIZE commandELLIPSEF [<exprX1>,<exprY1>,<exprX2>,<exprY2>][,][<exprLC>[,<exprFC>]]If exprLC is present then the line colour will be set before the ellipse is drawn.
If exprFC is present then the fill colour will be set before the ellipse is drawn. If you want to set the fill colour then the line colour must also be set.
If the co-ordinates are omitted then only the line colour, and possibly the fill colour, will be set.
The same as ELLIPSE except the ellipse is filled with the current fill colour.FILL [<exprX>,<exprY>][,][<exprFC>]Flood fill the area starting from <exprX>,<exprY>. The fill will continue until it reaches the screen edge or a pixel of a different colour to that originally at <exprX>,<exprY>.LINE [<exprX1>,<exprY1>[,<exprX2>,<exprY2>]][,][<exprLC>]If <exprFC> is specified then the fill colour will be set to that value before the fill starts. Also just giving <exprFC> will set the fill colour without drawing.
Draws a line from <exprX1>,<exprY1> to <exprX2>,<exprY2>. If <exprX2>,<exprY2> is omitted then the line is drawn from the current graphics position to <exprX1>,<exprY1>.LOAD <expression$>If <exprLC> is specified then the line colour will be set to that value before the line is drawn. Also just giving <exprLC> will set the line colour without drawing.
Attempts to load the file expression$. It will recognise the file format (binary or ASCII) and invoke the necessary routines.MODE <expression>During an ASCII load you will see the program as it is being read from the file. This file is also merged with any program lines currently in the memory.
Binary loading is much faster and over writes any program currently in memory.
Set the draw mode to <expression>. Valid values are 0 to 15.MOVE <exprX>,<exprY>
Mode Function Effect 0 False Drawing is always black 1 True Drawing is always white 2 Null Nothing is drawn but the cursor is moved 3 Inverse The inverse of the background is drawn 4 Colour The colour is drawn 5 Inverse colour The inverse of the colour is drawn 6 Inverse OR The inverse of the background OR the colour is drawn 7 Inverse AND The inverse of the background AND the colour is drawn 8 OR Inverse The background OR the inverse of the colour is drawn 9 AND Inverse The background AND the inverse of the colour is drawn 10 OR The background OR the colour is drawn 11 NOR The background NOR the colour is drawn 12 AND The background AND the colour is drawn 13 NAND The background NAND the colour is drawn 14 EOR The background ExclusiveOR the colour is drawn 15 ENOR The background ExclusiveNOR the colour is drawn Move the current graphics point to <exprX>,<exprY>. Nothing is drawn.POINT <exprX>,<exprY>[,<exprLC>]Set the colour of the point <exprX>,<exprY> to the current line colour.RECT [<exprX1>,<exprY1>,<exprX2>,<exprY2>][,][<exprLC>[,<exprFC>]]If <exprLC> is specified then the current line colour is set before the point is plotted.
The same as ELLIPSE except the bounding rectangle itself is drawn.RECTF [<exprX1>,<exprY1>,<exprX2>,<exprY2>][,][<exprLC>[,<exprFC>]]The same as RECT except the bounding rectangle is filled with the current fill colour.SAVE <expression$>[,a[n1][-n2]]Attempts to save the program memory to the file expression$. If the command has the ,a appended then the program will be saved in ASCII format. If saving in ASCII format then the range of the save can be specified as with the LIST command.SIZE <expression>Sets the width of lines drawn using the LINE command and the width of the outlines drawn using any of the shape commands.The valid range of <expression> is from 0 to 255 but setting a value of zero will actually give a width of one.
Returns the pixel colour value at point <exprX>,<exprY>.TIReturns the time since midnight in 1/100ths of seconds.