                GFA BASIC ver. 2.0 Quick Reference

The following list illustrates the GFA BASIC 2.0 command syntax 
with required parameters.  Command line parameters placed betweeen 
brackets [ ] are optional.

Source: GFA BASIC Reference Card, Copyright 1988 MichTron, Inc.

                          VARIABLE NAMES

A variable must begin with a letter, but may consist of any 
combination of letters and numbers, up to a maximum length of 255 
characters.

                        TYPES OF VARIABLES

var       Real variable, a six-byte floating point value, accurate 
          to 11 decimal places.  In Scientific Notation, exponents 
          of up to 154 are permitted.
var%      Integer variable, a four byte value representing a whole 
          number between -2147483648 and +2147483647.
var!      Boolean variable.  Requires 2 bytes for storage and may 
          only represent TRUE(-1) or FALSE(0) values.
var$      String variable.  May contain up to 32,767 alpha-
          numberic characters.

                         ARRAY VARIABLES

var(i)    One dimension real array.
var%(i)   One dimension integer array.
var!(i)   One dimension Boolean array.

                             POINTERS

*var      Real pointer.
*var%     Integer pointer.
*var!     Boolean pointer.
*var$     String pointer.
*var()    Array pointer.

                            CONSTANTS

ADDRIN    Addr of AES address input block.
ADDROUT   Addr of AES address output block.
BASEPAGE  Addr of the basepage of GFA BASIC.
CONTRL    Addr of VDI control block.
FALSE     0
GB        Addr of start of AES.
GCONTROL  Addr of AES control block.
GINTIN    Addr of AES integer input block.
GINTOUT   Addr of AES integer output block.
HIMEM     Addr of first byte after GFA BASIC.
INTIN     Addr of VDI integer input block.
INTOUT    Addr of VDI integer output block.
PI        3.1415926536
PTSIN     Addr of VDI point input block.
PTSOUT    Addr of VDI point output block.
TRUE      -1
VDIBASE   Addr of GEM storage area used by GFA BASIC.
WINDTAB   Addr of window parameter table.

                            OPERATORS

()        Parenthesis.
+         Assign possitive value (plus sign).
-         Assign negatie value (minus sign).
^         Exponent (raise to a power).
A*B       Floating point multiplication.
A+B       Real and integer addition.
A-B       Real and integer subtraction.
A/B       Floating point division.
A<B       Less than.
A<=B      Less than or equal to.
A<>B      Not equal to.
A=B       Equal in value.
A>B       Greater than.
A>=B      Greater than or equal to.
A$+B$     String concatenation.
AND       Logical conjunction, bit-wise operation.
DIV       Integer division.
EQV       Logical equivalence.
IMP       Logical implication.
MOD       Returns remainder from integer division.
NOT       Logical negation, bit wise operation.
OR        Logical comparison, bit wise operation.
XOR       Logical exclusive OR, bit wise operation.

                      MATHEMATICAL FUNCTIONS

ABS(x)    Returns the absolute value.
ADD x,y   Increases the value of x by y (addition).
ATN(r)    Calculates arc-tangent of an angle in radians.
COS(n)    Calculates the cosine of a number in radians.
DEC x,y   Decrements x by y.
DIV x,y   Divides x by y.
EVEN(x)   Returns a -1 value for an even number; otherwise returns 
          0.
EXP(n)    Calculates value of an exponent.
FIX(x)    Returns the integer portion of a value.
FRAC(x)   Returns the fractional portion of a value.
INC x     Increments x by 1.
INT(x)    Returns the integer portion of a value.
LOG(x)    Returns the natural logarithm of a value.
LOG10(x)  Returns the base 10 logarithm of a value.
MUL  x,y  Multiplies x by y.
ODD(x)    Returns a -1 value for an odd number; otherwise returns 
          0.
RANDOM(x) Returns a random integer number between 0 and x.
RND(dummy)
          Returns a random value between 0 and 1.
SGN(x)    Determines the sign of a value (1, -1 or 0).
SIN(angle)
          Calculates the sine in radians of a number.
SQR(n)    Calculates square root.
SUB x,y   Decreases x by y.
TAN(angle)
          Calculates the tangent of an angle in radians.
TRUNC(x)  Returns the integer portion of a value.
VOID expr Calls function without returning a value.

                         SYSTEM COMMANDS

CLEAR     Clears all variables and arrays.
CLR [var,var...]
          Deletes variables.
CONT      Resumes program execution.
DEFLIST 1 Defines listing format.  In this case, commands, 
          functions and variable names are written with the first 
          letter capitalized.
DEFLIST 0 Defines listing format.  In this case, commands and 
          function names are written in all capital letters.
EDIT      Terminates program and returns to the editor.
END       Closes all files and terminates program.
ERASE(field)
          Deletes an array and releases dimensioned area.
LIST      Stores program presently in memory on a disk in ASCII 
          format.
LIST "CON:"
          Displays listing of the program currently in memory on 
          the output screen.
LIST "file.lst"
          Stores program currently in memory on a disk in ASCII 
          format as "file.lst".
LLIST     Sends listing of program to an attached printer.
NEW       Removes program from memory.
QUIT      Terminates program and returns to GEM Desktop.
REM,',!   Enables remarks to be included in a program.
RUN       Immediate mode command.  Executes a program in memory.
STOP      Stops a program.
SYSTEM    Terminates program and returns to GEM Desktop.
TROFF     Disables trace mode.
TRON      Enables trace mode.

                         PROGRAM CONTROL

                        Looping Structures

FOR var=a [DOWN]TO b [STEP c]
   statement
NEXT var

GOTO label

DO
   statement
LOOP

REPEAT
   statement
UNTIL condition

WHILE condition
   statement
WEND

IF condition [THEN]
   statement
[ELSE]
   statement
ENDIF

EXIT IF condition

                 Subroutine (Procedure) Controls

PROCEDURE name
   LOCAL a,b,c Declares variable to be valid only in this 
               subroutine.
   statement
   statement
RETURN

GOSUB name

ON expr GOSUB name

                            Functions

DEFFN name [(list)]=expr
DEFFN name$[(list)]=string expr
FN name[(expr[,expr...])]
FN name$[(expr[,expr...])]

                         STRING COMMANDS

&H        Precedes hexadecimal value.
&O        Precedes octal value.
&X        Precedes binary value.
ASC(a$)   Returns the ASCII code of the first character in a 
          string.
BIN$(a)   Transforms a value into a character string expression in 
          binary (base 2) form.
CHR$(i)   Returns the character which corresponds to the ASCII value 
          of i.
CVD(a$)   Converts an 8-byte character string in MBASIC format 
          into a number.
CVF(a$)   Converts a 6-byte character string in GFA BASIC format 
          into a number.
CVI(a$)   Converts a 2-byte character string into a 16-bit 
          integer value.
CVL(a$)   Converts a 4-byte character string into a 32-bit 
          integer value.
CVS(a$)   Converts a 4-byte Atari BASIC character string into a 
          32-bit integer value.
FRE(0)    Returns free storage space in bytes.
HEX$(a)   Converts a value into a character string expression in 
          hexadecimal (base 16) form.
INSTR(a$,b$[,n])
          Returns the position of a specified character within a 
          string.
INSTR([n,]a$,b$)
          Returns the position of a specified character within a 
          string.
LEFT$(a$,n)
          Returns all characters beginning with the nth character 
          from the left side of a string.
LEN(a$)   Returns the length fo a string.
LSET var=string
          Left justifies a string.
MID$(a$,n1[,n2])
          Returns the character(s) from the position(s) specified 
          by n1 and n2 from within a string.
MID$(a$,n1[,n2])=b$
          Inserts a specified character or group of characters 
          into a string, at the positions specified by n1 and n2.
MKD$(i)   Converts a number into MBASIC-compatible 8-byte format.
MKF$(i)   Converts a number into GFA BASIC 6-byte format.
MDI$(i)   Converts a 16-bit integer into a 2-byte string.
MKL$(i)   Converts a 32-bit integer into a 4-byte string.
MKS$(i)   Converts a number into an Atari BASIC compatible 4-byte 
          format.
OCT$(a)   Converts a value into a character string expression in 
          octal (base 8) form.
RIGHT$(a$,n)
          Returns all characters beginning with the nth character 
          from the right side of a string.
RSET var=string
          right justifies a string.
SPACE$(n) Creates a string of n spaces.
STR$(a)   Converts a decimal value into a character string.
STRING$(n,"c")
          Creates a string of n characters specified by the 
          included string.
STRING$(n,c)
          Creates a string of n characters specified by the ASCII 
          code c.
UPPER$(a$)
          Converts a string to all upper case characters.
VAL(a$)   Returns the numerical value of the first character in 
          a string.
VAL?(a$)  Returns the number of characters in a string which can 
          be converted into a numerical value.

                       FIELDS AND POINTERS

ARRAYFILL FIELD(),N
          Assigns the value n to all elements in an array.
ARRPTR(var)
          Returns the address of the descriptor of a string or 
          array.
DIM(a$,x) Sets dimensions of an array or arrays.
DIM?(field)
          Returns the number of elements in an array.
MAX(expr) Returns the greatest value from a list of expressions.
MIN(expr) Returns the least value from a list of expressions.
OPTION "Text"
          Passes control commands to the GFA Compiler.
OPTION BASE 0
          Sets the lower limit of an array to zero.
OPTION BASE 1
          Sets the lower limit of an array to one.
SWAP *ptr,fvar()
          Exchanges the elements in the field pointed to by *ptr 
          with the elements in the array fvar().
SWAP fvar1(),fvar2()
          Exchanges the values of the elements in the array 
          fvar1() with the elements of fvar2().
SWAP var1,var2
          Exchages values of var1 with var2.
TYPE(*var)
          Returns the type of variable at which the pointer is 
          set:
              -1=Error
               0=Real
               1=String
               2=Integer
               3=Boolean
               4=Real array
               5=String array
               6=Integer array
               7=Boolean array
VARPTR(var)
          Returns the address or starting address of a variable.

                       ASSIGNMENT FUNCTIONS

DATA list,list,...
          Holds data items, or a list of data items, which may be 
          placed into a variable or an array by using the READ 
          function.
[LET] var=expr
          Assigns the value of an expression to a variable.
READ var  Reads values from a DATA statement and assigns them to a 
          variable, var.
RESTORE [label]
          Places the DATA pointer at the beginning of the program, 
          or after the label specified.

                         INPUT AND OUTPUT

CRSCOL    Determines the cursor column.
CRSLIN    Determines the cursor row.
DEFNUM n  Rounds all numbers to n digits before output.
FORM INPUT
          Permits the input of a character string during program 
          execution.
FORM INPUT n AS a$
          Permits a character string to be changed during program 
          execution.  n is the max length of the string variable.
HARDCOPY  Sends screen contents to an attached printer.  (Same as 
          pressing the <Alternate><Help> combination.)
INKEY$    Reads a character from the keyboard.
INP(n)    Reads one byte at a time from an input device.
               0 = LST: (printer)
               1 = AUX: (RS-232)
               2 = CON: (keyboard)
               3 = MID: (MIDI port)
INP?(n)   Determines input status of specified peripheral device 
          (as shown above).
INPUT     Permits information to be entered from the keyboard 
          during program execution.
INPUT#    Permits information to be entered from a specified 
          channel during program execution.
INPUT$(len,a$)
          Reads len characters from the keyboard or from a file.
LINE INPUT
          Permits a string to be entered during program execution.
LINE INPUT#
          Permits a string to be entered from a specified channel 
          during program execution.
LPOS(n)   Returns the column where the printer head is located.
OUT n,c   Transfers one byte to a specified output device:
               0 - 3 (same as above)
               4 = IKB: (Intelligent keyboard; use with caution)
               5 = VID: (Screen)
OUT?(n)   Returns status of specified output device.
POS(dummy)
          Returns the column in which the cursor is located.
PRINT or LPRINT or PRINT #
          Displayes information of the screen or specified data 
          channel.
   AT(x,y)
          Prints at a position specified by the curosor column and 
          row.
   TAB(n) Moves cursor position to the nth column.
   SPC(n) Prints a number of spaces specified by n.
   ;      Carriage return/line feed suppressed after printing.
   ,      Carriage return/line feed suppressed.  Cursor positioned 
          at intervals of 16 columns.
   '      One space is left in for each apostrophe.
PRINT USING
          Formatted output of digit and character strings.
             Format      Description
             #           Reserves spaces for digits.
             .           Positions decimal point.
             +           Prints plus sign.
             -           Reserves space for minus sign.
             *           Reserves space for digits, but prints * 
                         if reserved digit is not used.
             $$ or $     Prefix $.
             ,           Inserta a comma.
             ^^^^        Displaya in exponential form.
             !           Indicates first character of a string is 
                         printed.
             &           Whole string is printed.
             \..\        As many characters are printed as there 
                         are characters between the \\.
             _           Treats next character in the format 
                         string as a character, rather than as a 
                         format character.
WRITE     Outputs data to the screen.
WRITE#    Stores data in a sequential file.

                    SEQUENTIAL AND RANDOM DATA

CLOSE#n   Closes a data channel.
EOF(#n)   Determines whether the file pointer has reached the end 
          of the file.
FIELD #n,expr AS a$ [,expr2 AS a2$...]
          Divides a record into arrays.
GET #n    Reads a record from a random acess file.
INP(#n)   Reads one byte of data from a file on data channel n.
INPUT#n   Obtains data from file on channel n.
INPUT$(i) Reads a specified number of character from the keyboard.
LINE INPUT#n,a$
          Obtains data from channel n.
LOC#n     Returns the location of the file pointer for the fifle 
          with the channel number n.
LOF(#n)   Returns the length of the file with the channel number 
          n.
OPEN "mode" [#]n,"file name"[,len]
          Opens a data channel to a disk.
             Mode        Open for
             A           Append
             I           Input
             O           Output
             R           Random access
             U           Reading and writing
OUT#n,c   Transfers one byte of data to a file on data channel n.
PRINT#n   Sends data to a file on data channel n.
PUT#n     Writes a record to a random access file.
RELSEEK#n,x
          Moves the file pointer x bytes in a file with the 
          channel number n.
SEEK#n,x  Sets file pointer on the xth byte of the file associated 
          with channel number n.
WRITE#n   Stores data in a sequential file.

                      GENERAL DISK COMMANDS

BGET #n,adr,len
          Reads from a specified data channel directly into memory.
BLOAD "file",adr
          Loads a disk file directly to a specified area of 
          memory.
BPUT #n,adr,len
          Writes a specified area of memory directly to disk.
BSAVE "file",adr,len
          Saves a specified area of memory to disk.
CHAIN "file.bas"
          Loads a program file into memory and starts the program.
EXEC(flag,"file",cmd,env)
          Loads and executes machine language or compiled programs 
          from disk.
EXIST("file.ext")
          Determines whether a specified file is present on the 
          disk (-1 if present, 0 if not present).
KILL "file"
          Deletes a disk file.
LIST "file.lst"
          Saves a file to disk in ASCII format.
LOAD "file"
          Loads a file into memory.
NAME "oldfile" AS "newfile"
          Renames a file as specified.
PSAVE "file"
          Saves a file in protected format.
SAVE "file"
          Saves a file to disk.

                       DIRECTORY FUNCTIONS

CHDIR "name"
          Changes directories.
CHDRIVE n Sets the default disk drive.
DFREE(n)  Returns the amount of free storage space on the 
          specified disk.
DIR ["A:\*.*"]
          Lists files on a disk.
DIR$(n)   Returns the name of the active directory for drive 
          number n.
FILES ["A:\*.*"]
          Lists files on a disk.
FILESELECT "filespec","filename",x$
          Calls the GEM file selector box.
MKDIR "name"
          Creates a new directory.
RMDIR "name"
          Removes a directory folder.

                        GRAPHICS COMMANDS

BITBLT s%(),d%(),p%()
          Raster copying command.
BMOVE src,dest,cnt
          Fast movement of blocks of memory.
BOX x1,y1,x2,y2
          Draws a rectangle.
CIRCLE x,y,r,s,e
          Draws a circle or arc.
CLS       Clears the screen.
COLOR c   Sets the color for drawing.
DEFFILL c,a$
          Sets user defined color and fill pattern as defined in 
          a$.
DEFFILL c,a,b
          Sets fill color and pattern.
DEFLINE style,width,type,start,end
          Sets line style, line width, type of line, and starting 
          and ending point types.
DEFMARK c,t,g
          Sets color, type and corner points for POLYMARK.
DEFTEXT c,s,r,g
          Defines color, style, rotation and size of text.
DRAW [TO] x1,y1
          Draws and connects two or more points with straight 
          lines.
DRAW x1,y1 [TO] x2,y2
          Draws and connects two or more points with straight 
          lines.
ELLIPSE x,y,rx,ry
          Draws an ellipse.
FILL x,y  Fills an area with a specified pattern.
GET x1,y1,x2,y2,a$
          Reads a rectangle from the screen and stores it in a 
          string.
GRAPHMODE n
          Sets graphic mode:
             1 Replace
             2 Transparent
             3 XOR
             4 Reverse transparent
LINE x1,y1,x2,y2
          Connects two points with a straight line.
PBOX x1,y1,x2,y2
          Draws a filled rectangle.
PCIRCLE x,y,r,s,e
          Draws a filled circle or arc.
PLOT x,y  Draws a single point on the screen.
POINT(x,y)
          Returns the color value of a specified pixel location.
POLYFILL n,x(),y()
          Draws a filled-in shape with n corner points.
POLYLINE n,x(),y()
          Draws a shape with n corner points.
POLYMARK n,x(),y()
          Marks n corner points.
PRBOX x1,y1,x2,y2
          Draws a filled rectangle with rounded corners.
PUT x1,y1,a$
          Places a string obtained with GET onto the screen.
RBOX x1,y1,x2,y2
          Draws a rectangle with rounded corners.
SETCOLOR i,n
          Defines color components.
SETCOLOR i,r,g,b
          Defines red, green and blue color components.
SGET a$   Copies screen memory into a 32K string.
SPRITE a$,x,y
          Puts a predefined sprite on the screen at the location 
          specified by x and y.
SPUT a$   Copies 32K byte string to screen memory.
TEXT x,y,a$
          Places text on the screen at the position specified by x 
          and y.
VSYNC     Wait for vertical blank.

                         MOUSE FUNCTIONS

DEFMOUSE a$
          Defines a mouse form.
DEFMOUSE n
          Selects a predefined mouse form.
HIDEM     Hides mouse.
MOUSE x,y,k
          Returns the mouse position (x,y) and status of the mouse 
          buttons (k).
MOUSEK    Returns status of mouse buttons.
             0 None pressed
             1 Left button down
             2 Right button down
             3 Both down
MOUSEX    Returns horizontal coordinate of the mouse pointer.
MOUSEY    Returns vertical coordinate of the mouse pointer.
SHOWM     Shows mouse.

                         SOUND FUNCTIONS

SOUND voc,vol,note,oct[,dur]
          Generates tones.
SOUND voc,vol,period[,dur]
          Generates tones.
WAVE voc,env,form,len,dur
          Defines waveform for sound.

                          TIME FUNCTIONS

DATE$     Returns system data as a character string in format 
          mm/dd/yyyy.
PAUSE n   Suspends program execution for n/50 seconds.
SETTIME t$,d$
          Sets the time and date.
TIME$     Returns the system time as a character string in the 
          format hh:mm:ss.
TIMER     Returns the time since the system was turned on in 
          200ths of a second.

                        WINDOWS AND MENUS

ALERT icon,text,string,button,button text,x
          Creates an Alert box
             Icon        Displays
             0           Nothing.
             1           Exclamation point.
             2           Question mark.
             3           Stop sign.
CLEARW n  Clease the contents of the window specified by n.
CLOSEW 0  Switches to normal screen display.
CLOSEW n  Closes the window specified by n.
FULLW n   Enlarges window n to full screen size.
INFOW n,"info"
          Defines a new information line for the window specified 
          by n.
MENU field()
          Creates menu bar.
MENU KILL Deactivates menu bar.
MENU n,x  Alters menu items.
             0           Removes checkmark.
             1           Places checkmark.
             2           Writes in plain letters, cannot be 
                         selected.
             3           Writes in normal letters, can be 
                         selected.
MENU OFF  Disables menu titles in "normal" mode.
MENU(f)   Detects events for ON MENU GOSUB.
ON MENU   Handles menu selection.
ON MENU BUTTON c,m,s GOSUB name
          Defines procedure for handling mouse button presses.
ON MENU GOSUB name
          Defines precedure which handles menu selection.
ON MENU IBOX a,x,y,b,h GOSUB name
          Defines the procedure for when the mouse moves into a 
          defined rectangular area.
ON MENU KEY GOSUB name
          Defines procedure which handles keyboard input.
ON MENU MESSAGE GOSUB name
          Defines the procedure for handling GEM messages.
ON MENU OBOX a,x,y,b,h GOSUB name
          Defines the procedure for when the mouse moves out of a 
          defined rectangular area.
OPENW 0   Opens the whole screen as a window without a menu bar.
OPENW n,x,y
          Opens a specified window at the coordinates x,y.
TITLEW n,"title"
          Assigns a new name to the window specified by n.

                      MACHINE LEVEL COMMANDS

BIOS(n,parameter list)
          Calls TOS BIOS functions.
C:var(parameters)
          Calls a compiled C or machine language subprogram 
          located in memory at the address specified by var.  
          Parameters are transferred as in C.
CALL var [(parameters)]
          Calls a machine language program located in memory at 
          the address sppecified by var.
DPEEK(addr)
          Returns the contents of two bytes of memory.
DPOKE addr,n
          Writes two bytes to addresses in memory.
GEMDOS(n,parameter list)
          Calls TOS GEMDOS functions.
GEMSYS    Calls the AES function specified by the function number 
          entered in the GCONTRL block.
GEMSYS(n) Calls the AES functions specified by n.
LPEEK(addr)
          Returns the contents of four bytes from an address in 
          memory.
LPOKE addr,n
          Writes four bytes to an address in memory.
MONITOR   Calls a memory resident monitor program or a commands 
          extension.
PEEK(addr)
          Returns the contents of one byte of memory.
POKE addr,n
          Writes one byte to an address in memory.
RESERVE n Increases or decreases the amount of memory available to 
          GFA BASIC.
SDPOKE addr,n
          Writes two bytes to an address in memory in the 68000's 
          supervisor mode.
SLPOKE addr,n
          Writes four bytes to an address in memory in the 68000's 
          supervisor mode.
SPOKE addr,n
          Writes one byte to an address in memory in the 68000's 
          supervisor mode.
VDISYS    Calls VDI function with the function number entered in 
          the CONTRL block.
VDISYS(n) Calls VDI function without entering the function number 
          in the CONTRL block.

                             ON BREAK

ON BREAK  Deactivates ON BREAK GOSUB, or restores break 
          conditions.
ON BREAK CONT
          Deactivates <Control><Alternate><Shift> break key 
          sequence.  ON BREAK may be used to reactivate keys.
ON BREAK GOSUB proc_name
          Jumps to a procedure when a break key sequence is 
          encountered.
ON expression GOSUB proc_list
          Permits program redirection to a list of procedures.

                          ERROR HANDLING

ERR       Returns the error code of any error which may have 
          occurred.
ERROR n   Simulates the occurrence of an error with the specified 
          error code (n).
FATAL     Returns the value of 0 or -1 depending on which type of 
          an error was enountered.  Generally, -1 is an 
          unrecoverable error.
ON ERROR  Switches to normal error handling methods if an 
          alternate means was previously defined.
ON ERROR GOSUB proc_name
          Defines an error handling procedure.

                     GFA BASIC ERROR MESSAGES

0         Division by zero.
1         Overflow.
2         Number not integer (-21473648 to 2147483647).
3         Number not byte (0-255).
4         Number not word (0-65535).
5         Square root only for positive numbers.
6         Logarithm only for number greater than zero.
7         Undefined error.
8         Memory full.
9         Function or command not possible.
10        String too long (max. size 32,767 characters).
11        Not GFA BASIC v. 1.0 program.
12        Program too long, memory full, NEW.
13        Not GFA BASIC program file, too short, NEW.
14        Field dimensioned twice.
15        Field not dimensioned.
16        Field index too large.
17        DIM index too large.
18        Wrong number of indexes.
19        Procedure not found.
20        Label not found.
21        On Open only "I"nput, "O"utput, "R"andom, "A"ppend and 
          "U"pdate allowed.
22        File already open.
23        File # wrong.
24        File not opened.
25        Input wrong, not numeric.
26        End of file reached.
27        Too many points for Polyline/Polyfill, max. 128.
28        Field must be one dimensional.
29        Number of points larger than field.
30        Merge not an ASCII file.
31        Merge line too long -- aborted.
32        ==>Syntax error -- program aborted.
33        Label not defined.
34        Insufficient data.
35        Data not numeric.
36        Syntax error in DATA unpaired quotes.
37        Disk full.
38        Command not possible in direct mode.
39        Program error -- GOSUB not possible.
40        CLEAR not possible in FOR - NEXT loops and procedures.
41        CONT not possible.
42        Too few parameters.
43        Expression too complex.
44        Function not defined.
45        Too many parameters.
46        Parameter wrong -- must be numeric.
47        Parameter wrong -- must be string.
48        Open "R" -- record length wrong.
49        Undefined error.
50        Not an "R" file.
51        Only one field per Open "R" allowed.
52        Fields larger than record length.
53        Too many fields (max. 9).
54        GET/PUT fields string length wrong.
55        GET/PUT record number wrong.
56        String has wrong length for SPRITE.
90        Error in LOCAL.
92        Resume (next) not possible FATAL, FOR or LOCAL.
100       Version # of GFA BASIC.

            TOS AND GFA BASIC COMPILER ERROR MESSAGES

-1        General error.
-2        Drive not ready -- time exceeded.
-3        Undefined error.
-4        CRC error -- disk checking sum wrong.
-5        Bad request -- invalid command.
-6        Seek error -- track not found.
-7        Unknown media -- boot sector wrong.
-8        Sector not found.
-9        No paper.
-10       Write fault.
-11       Read fault.
-12       General error 12.
-13       Disk is write protected.
-14       Disk has been changed.
-15       Unknown device.
-16       Bad sector (verify).
-17       Insert other disk.
-32       Invalid function number.
-33       File not found.
-34       Path not found.
-35       Too many files open.
-36       Access not possible.
-37       Invalid handle.
-39       Memory full.
-40       Invalid memory block address.
-46       Invalid drive ID.
-49       No further files.
-64       GEMDOS range error -- seek wrong?
-65       GEMDOS internal error.
-66       Not binary program file.
-67       Memory block error.

              68000 EXCEPTION (BOMB) ERROR MESSAGES

CODE      BOMBS          MEANING
102       2 bombs        Bus error -- PEEK or POKE possibly wrong.
103       3 bombs        Address error.  Odd word address.  
                         Possibly in DPOKE, DPEEK, LPOKE or LPEEK.
104       4 bombs        Illegal instruction; execution of an 
                         invalid 68000 assembler command.
105       5 bombs        Division by zero in 68000 ML.
106       6 bombs        CHK exception.
107       7 bombs        TRAPV exception.
108       8 bombs        Privilege violation.
109       9 bombs        Trace exception.

                    VT52 TERMINAL ESCAPE CODES

ESCAPE    FUNCTION
CHR$(27)+

A         Cursor up one line.
B         Cursor down one line.
C         Cursor right one char.
D         Cursor left one char.
E         Clear screen.
H         Home cursor.
I         Cursor up one line with scroll.
J         Erase to end of page.
K         Clear to end of line.
L         Insert line.
M         Delete line.
Y,r,c     Position cursor at row, column.
b,f       Set foreground color.
c,b       Set background color.
d         Erase to start of page.
e         Show cursor
f         Hide cursor.
j         Save cursor.
k         Restore cursor.
l         Erase line.
o         Erase to start of line.
p         Reverse video.
q         Normal video.
v         Wrap at end of line.
w         Discard end of line.

