ZBASIC Help File - by Mark McDonald 911030
ZBASIC Interpiler Commands:
LOAD filename.ext - loads source file
LOAD*filename.ext - loads source file, deleting comments
RUN               - compiles and executes program.
RUN filename.ext  - loades/compiles/executes program.
RUN*              - compiles program and prompts for .COM name.
RUN+              - compiles program and prompts for .CHN name.(chain file).

ZBASIC-PC Command Reference

ABS ---------------------------------------------------------------------------
     Format: ABS(expression)
 Definition: Returns the absolute value.
             The result will always be a positive number or 0.
    Example: A = - 15
             PRINT ABS(A)
             RUN
             15
AND ---------------------------------------------------------------------------
     Format: expression1 AND expression2
 Definition: Used to determine if BOTH conditions are true. Returns
             -1 for true and 0 for false.
ASC ---------------------------------------------------------------------------
     Format: ASC(string)
 Definition: Returns the ASCII code value(decimal) of the first character
             of string.
ATN ---------------------------------------------------------------------------
     Format: ATN(expression)
 Definition: Returns the angle, in radians, for the inverse tangent of
             expression.
BEEP --------------------------------------------------------------------------
     Format: BEEP
 Definition: Sounds the speaker.
    Example: FOR X = 1 TO 5
               BEEP
             NEXT X
             RUN
             BEEP BEEP BEEP BEEP BEEP
BIN ---------------------------------------------------------------------------
     Format: BIN$(expression)
 Definition: Returns a 16 character string which represents the binary
             (BASE 2) value of integer expression
    Example: A$ = BIN$("3")
             PRINT A$
             RUN
             0000000000000011
BLOAD -------------------------------------------------------------------------
     Format: BLOAD filespec[,[offset][,segment]]
 Definition: Loads a block of memory that was saved as filespec using
             the BSAVE statement.
             The optional offset is the position in memory to load the
             block into the current segment as defined using DEF SEG (or
             the segment option if used).
             If the offest and/or the segment is omitted, the information
             that was stored in the file with BSAVE is used.
    Example: MODE 7
             BLOAD "CGASCRN.MEM"
             DELAY 4000
BOX ---------------------------------------------------------------------------
     Format: BOX [TO]exprx1,expry1 [TOexprx2, expry2 ...]
             BOXFILL [TO]exprx1,expry1 [TOexprx2, expry2 ...]
 Definition: Draws a box from th coordinates defined by the first corner(x1,y1)
             to the coordinates defined by the opposite corner (x2,y2) in the
             current color.
             If the BOX TO x,y is used the first corner will be the last graphic
             position used. If undefined then 0,0 will be used.
             If the optional FILL appears directly after the command, the  BOX
             will be painted as a solid BOX in the current color.
             The default screen positions are givne using Device Independent
             Coordinates of 1024 across by 768 down.
BSAVE -------------------------------------------------------------------------
     Format: BSAVE filespec, offset, length [,segment]
 Definition: SAves a block of memory as filespec so that it may be loaded later
             with BLOAD. It saves an exact image of memory.
             The optional offset is the position in memory to load the block
             and will save the current segment as defined using the DEF SEG
             statement(or the segment option if used).
             If DEF SEG is not used, the DATA SEGMENT(MEMD) is used.
     Remark: MODE    TYPE       ADDRESS       LENGTH
             0-15    CGA        &HB800        2048-16,384
             2       MDPA       &HB800        4096
             20      Hercules   &HB000        32,767
             20      Hercules   &HB800        32,767
             Note: EGA, VGA and MCGA graphics are stored in memory in a
                   different format than other graphic cards. To save images
                   in EGA, VGA and MCGA modes 16-19 and 21-23 you should GET
                   the screen. Save the screen to disk using:
                    BSAVE filespec, VARPTR(var%(n)), number of elements/2
                   BLOAD the integer array back into memory using
                    BLOAD filespec, VARPTR(var%(n))
                   and then PUT the image back to the screen.
CALL --------------------------------------------------------------------------
     Format: CALL address[, segment]
 Definition: This statement is used to execute a subroutine located in memory
             at the segment given by segment with an offest of address.
             If segment is not given, then ZBASIC code segment is used.
    Example: CALL LINE "Routine"
             Calls a ZBASIC routine starting at "Routine"(same as GOSUB but
             slower).
             CALL &H100, &H0BD7
             Calls a subroutine located at &HBD7 with an offset of &H100.
     Remark: Any subroutine called by specifying the segment must return from
             the subroutine with a far return. Otherwise, unpredictable results
             will occur.
     Format: CALL string
 Definition: The CALL statement followed by a string will load and execute
             another program or DOS command specified by string. IF a null
             string is specified, then DOS will be loaded and executed, in
             which case typing EXIT in DOS will return to ZBASIC-PC.
             This is identical to the "SHELL" statement and is retained to
             remain compatible with other BASICs. See Shell.
             string must be either a string variable or a quoted string.
    Example: CALL "DISKCOPY A: B:"
             This will perform a diskcopy as if it was typed in from the DOS
             command line.
             CALL ""
             Gives control to DOS, displays DOS prompt. Type EXIT in DOS to
             return to ZBASIC-PC.
             A$ = "DIR A:*.BAS"
             CALL A$
             This will get the directory of all .BAS files on drive A.
     Remark: There must be at least 17k of memory free to use the CALL
             statement. If COMMAND.COM is not found, the message "File not
             found" will be echoed to the display and control will return to
             ZBASIC-PC.
CARDTYPE ----------------------------------------------------------------------
     Format: CARDTYPE
 Definition: Returns type of graphic hardware connecto the current system.
    Example: A = CARDTYPE
             PRINT A
      Table: Single Monitor  Dual Monitor            Dual Monitor
             CGA          0  CGA+MDA          16     CGA+HERCULES          32
             EGA COLOR    1  EGA COLOR+MDA    17     EGA COLOR+HERCULES    33
             EGA MONO     2  EGA MONO+MDA     18     EGA MONO+HERCULES     34
             VGA COLOR    4  VGA COLOR+MDA    20     VGA COLOR+HERCULES    36
             VGA MONO     5  VGA MONO+MDA     21     VGA MONO+HERCULES     35
             MCGA COLOR   6  MCGA COLOR+MDA   22     MCGA COLOR+HERCULES   36
             MCGA MONO    7  MCGA MONO+MDA    23     MCGA MONO+HERCULES    37
             VESA (256K)  8  VESA (256K)+MDA  24     VESA (256K)+HERCULES  38
             VESA (512K)  9  VESA (512K)+MDA  25     VESA (512K)+HERCULES  39
             VESA (1Meg) 10  VESA (1Meg)+MDA  26     VESA (1Meg)+HERCULES  40
             VESA (2Meg) 11  VESA (2Meg)+MDA  27     VESA (2Meg)+HERCULES  41
             VESA (4Meg) 12  VESA (4Meg)+MDA  28     VESA (4Meg)+HERCULES  42
             VESA (8Meg) 13  VESA (8Meg)+MDA  29     VESA (8Meg)+HERCULES  43
             VESA (16Meg)14  VESA (16Meg+MDA  30     VESA (16Meg)+HERCULES 44
             VESA (>16M) 15  VESA (>16M)+MDA  31     VESA (>16M)+HERCULES  45

                             MDA             255     HERCULES               3

       Note: Some video cards do not follow the convention of identifying
             their type in the "BOIS footprint". In this case ZBASIC-PC makes
             an educated guess based upon factors such as amount of memory
             installed on the card. If the card is improperly identified the
             probably result will be a system lockup, scrambled graphics or a
             blank screen when graphics are attempted.
CASE --------------------------------------------------------------------------
     Format: SELECT [CASE][expression]
               CASE[IS] relational expression[, relational expression][,...]
                 statement[:statement...]]
               CASE[IS] condition[,condition][,...]
                 statement[:statement...]]
               CASE boolean expression
                 statement[:statement...]]
               CASE ELSE
                 statement[:statement...]]
             END SELECT
 Definition: When SELECT/CASE is encountered, the program checks the value of
             the controlling expression or variable, finds the CASE that
             conpares true and executed the statements directly following
             the CASE statement. After these statements are preformed, the
             program continues a thte line after the END SELECT statement.
       Note: Never exit a SELECT CASE structure using GOTO. This will
             introduce problems into the stack and cause unpredictable system
             errors. Always exit the structure at the END SELECT. Be sure to
             enclose loops and other contrucs completely within the SELECT-CASE
             and CASE ELSE constructs.
CHDIR -------------------------------------------------------------------------
     Format: CHDIR pathname
 Definition: Changes the current directory to the directory specified by
             pathname. This enables ZBASIC-PC to access files in different
             directories.
    Example: A$ = PATH$(0)                    :' Get current path
             CHDIR "\ZBASIC\DATA"             :' Change Path
             OPEN"I",1,"MYDATA.TXT"           :' Opens file on new path
             CHDIR A$                         :' Restores Path
       Note: If an error is encountered, ZBASIC-PC returns an error(11).
CHR$ --------------------------------------------------------------------------
     Format: CHR$(expression)
 Definition: Returns a single character string with the ASCII value of
             expression. The range for expression is 0 to 255.
    Example: PRINT CHR$(65)
CINT --------------------------------------------------------------------------
     Format: CINT(expression)
 Definition: Truncates all digits to the right of decimal point of expression.
CIRCLE ------------------------------------------------------------------------
     Format: CIRCLE [FILL] expr1, expr2, exprR
             CIRCLE        expr1, expr2, exprR TO exprS, exprB
             CIRCLE        expr1, expr2, exprR PLOT exprS, exprB
 Definition: Draws a circle in the current color.
             If the optional FILL is used, the circle will be filled with the
             current color. If TO is used, a PIE segment will be displayed
             (shaped like pie slices). If PLOT is used, only the ARC segment
             will be displayed(a segment of the circumference).

             expr1   Horizontal center
             expr2   Vertical center
             exprR   Radius(diameter of circle) in graphic coordinates
             exprS   Start of angle in brads(0 starts at 3:00 o'clock)
             exprB   Number of brads to draw ARC or PIE(counter clockwise)
     Remark: CIRCLE uses the ZBASIC-PC Device Independent Graphic Coordinates
             1024 x 768.
CLEAR -------------------------------------------------------------------------
     Format: CLEAR
             CLEAR number
             CLEAR END
             CLEAR INDEX$
 Definition: Used to reserve memory or clear all or specified variables (sets
             the value of the variables to null or zero).
             CLEAR          Sets all variables and INDEX$ to zero or null.
             CLEAR number   Sets aside number of bytes for INDEX$ array.
             CLEAR END      Clears all variables which have not yet been
                            assigned in the program. This form of CLEAR is
                            normally used to clear all variables not being used
                            when chaining.
       Note: Only one CLEAR number is allowed in a program and must appear
             before any variables are encountered. Be sure to CLEAR one extra
             byte for each element in the INDEX$ array.
             A CLEAR is performed at the beginning of each program created
             with RUN or RUN*. RUN+ or warm start programs will not clear
             variables at startup.
CLOSE -------------------------------------------------------------------------
     Format: CLOSE[[#]expression1[,[#]expression2...]]
 Definition: This statement is used to CLOSE one or more OPEN files or
             other devices.
             The parameter expression indicated a device or file number.
             If no file or device numbers are declared all OPEN devices will be
             closed.
       Note: All files should be closed before leaving a program to insure
             that data will not be lost or destroyed. If program exit is
             through END or STOP, all files will be closed.
CLS ---------------------------------------------------------------------------
     Format: CLS
             CLS expression
             CLS LINE
             CLS PAGE
 Definition: These statements will clear all, or portions of the screen of text
             and graphics.
             CLS            Clears the entire screen of text and graphics.
                            Cursor ends up at the top left corner of screen.
             CLS expression In TEXT mode this fills the screen with the ASCII
                            character specified by expression and places the
                            cursor at the top left corner of the screen.
             CLS expression In GRAPHICS mode this will fill the screen with the
                            color specified by expression.
             CLS LINE       Clears from the cursor position to the end of the
                            line. Cursor will remain where it was.
             CLS PAGE       Clears from the cursor position to the end of the
                            screen. Cursor will remain where it was.
       Note: CLS clears the current window(not the entire screen). CLS
             expression will clear the screen with white if expression = 0 and
             black if expression <> 0.
COLOR -------------------------------------------------------------------------
     Format: COLOR [=][foreground][,[background][,[,border]]
 Definition: This statement controls the color of all output to the screen. All
             of the parameters are optional. Under all modes COLOR 0 will turn
             foreground off(black in B/W modes, space in character modes).
      Table: Character Modes 0,1,3,4,6,8,9,11,12,14
               Foreground 0-15  Background 0-7  Border 0-15
             Character Modes 2,10,18
               Foreground 0-15  Background 0-15 Not Used
             Graphics Modes 5,13,16
               Foreground       Background      Border
               0 - Black(invis) 0               0-15 (Normal)
               1 - Green
               2 - Brown
               0 - Black        1               16-31 (High Intensity)
               1 - Cyan
               2 - Magenta
               3 - White
               In this mode, background equals Palette, Border is a global
               background and border value.
             Graphics Modes 7,15,17,21
               Foreground 0-1   Background 0-7   Border
               Foregound values toggle display off/on, Border may provide
               different(or no) results on various EGA/VGA hardware in CGA
               mode; typically there is no effect on "pure" CGA cards.
             Graphics Modes 19,22
               Foreground 0-15  Background 0-15  Border 0-15
             Graphics Mode 20
               In Hercules mode there are only two colors; black and white.
               There are three character formats: Regular, Reverse and XOR.
               (See TFORMAT).
             Graphics Mode 23
               Foregound 0-255  Background 0-255  Border 0-255
             Mono Codes
               Attributes   Normal Bright Reverse
                Regular        7     15     112
                Blinking     135    143     240
                Underline      1      9
                UL Blinking  129    137
                Invisible    136
             CGA Color Codes
              0 = Black  4 = Red      8 = Gray     12 = Lt Red
              1 = Blue   5 = Magenta  9 = Lt Blue  13 = Lt Magenta
              2 = Green  6 = Brown   10 = Lt Green 14 = Yellow
              3 = Cyan   7 = White   11 = Lt Cyan  15 = Bright White
             IBM PC Color Chart
              Background   Black Blue  Green Cyan Red Magenta Yellow White
              Colors
              Black         0    +16    +32   +48 +64  +80     +96    +112
              Blue          1
              Green         2    For blinking forground colors,add 128 to base.
              Cyan          3    EXAMPLE:
              Red           4             Blinking Brt Yellow on Black backgrnd
              Magenta       5             14 + 128 = 142
              Brown         6             ^     ^
              White         7             |     +---------- Blink Value
              Lt Black      8             +---------------- Foreground Color
              Lt Blue       9             Blinking Yellow on Blue background
              Lt Green     10             14 + 16 + 128 = 158
              Lt Cyan      11             ^    ^     ^
              Lt Red       12             |    |     +------- Blink Value
              Lt Magenta   13             |    +------------- Background Offset
              Lt Yellow    14             +------------------ Foreground Color
              Lt White     15

                         16 COLOR DEFINITION TABLE

0 = Black                             32 = Deep Red
1 = Blue                              33 = Purple
2 = Green                             34 = Medium Green
3 = Cyan                              35 = Light Gray Cyan
4 = Red                               36 = Bright Red
5 = Magenta                           37 = Fuchia
6 = Yellow Brown                      38 = Gold
7 = Light Gray                        39 = Light Pink
8 = Dark Blue                         40 = Deep Purple
9 = Bright Blue                       41 = Bright Purple
10 = Medium Celery                    42 = Celery
11 = Sky Blue                         43 = Light Sky Blue
12 = Dark Fuchia                      44 = Medium Fuchia
13 = Lilac                            45 = Medium Magenta
14 = Light Yellow                     46 = Tan
15 = Light Blue Purple                47 = Light Lilac
16 = Kelly Green                      48 = Olive Green
17 = Light Blue                       49 = Medium Purple Blue
18 = Bright Green                     50 = Neon Green
19 = Mint Green                       51 = Medium Mint Green
20 = Brown                            52 = Orange
21 = Light Magenta                    53 = Medium Pink
22 = Bright Light Green               54 = Bright Yellow
23 = Light Green Yellow               55 = Light Manilla
24 = Blue Gray                        56 = Gray
25 = Bright Light Blue                57 = Medium Blue
26 = Light Green                      58 = Green Yellow
27 = Light Cyan                       59 = Light Blue Cyan
28 = Light Brick Red                  60 = Dark Peach
29 = Light Purple                     61 = Medium Lilac
30 = Yellow Green                     62 = Yellow
31 = Very Light Cyan                  63 = White

See DEF COLOR for construction of 256 color values.

COMBUFF -----------------------------------------------------------------------
     Format: COMBUFF (-port)
 Definition: Returns the number of bytes waiting in the communication buffer.
             The communication buffer is a first in, first out (FIFO) buffer.
             To read data out of the buffer use READ#, INPUT# or LINEINPUT#.
             OPEN "C" to set baud rate, buffer size, parity and handshaking.
      Table: Port   Device    Port    Device
              -1     COM1      -2      COM2
              -3     COM3      -4      COM4
     Remark: COM BUFF determines the size of the communications buffer in the
             following way:
             As bytes are read from the com port into the buffer the COM END
             pointer is positioned to the next available position in the buffer.
             When it gets to the end of the buffer it wraps around the
             beginning.
             As bytes are read out of the buffer using READ#, INPUT# or
             LINEINPUT#, the COM START pointer is incremented to the next
             available byte. When COM START = COM END then all data has been
             read out of the buffer.
             When either COM END or COM START get to the end of the buffer
             tye "wrap around" to the beginning. If COM END ever "catches
             up" to COM START (COM END = COM START minus one), no more space
             is available in the buffer and nay received characters are lost.
COM ON/OFF --------------------------------------------------------------------
     Format: COM (port) ON
             COM (port) OFF
 Definition: Enables or disables the interrupt driven communications for a
             specified prot. While program execution is taking place between
             these statements, incoming data is from the serial device
             specified by port is loaded into a FIFO buffer. It may be
             read out of the buffer using the READ#, IPUT#, or LINEINPUT#
             statements.
      Table: Port    Device
              -1      COM1
              -2      COM2
              -3      COM3
              -4      COM4
       Note: COM ON is assumed when OPEN "C" is used.
COMMAND$ ----------------------------------------------------------------------
     Format: COMMAND$
 Definition: This function returns the command line string used to start up a
             program from DOS(ie. a ZBASIC-PC program saved as a .COM file).
             The string does not include the name of the program.
    Example: Message$ = COMMAND$
COMMON ------------------------------------------------------------------------
     Format: COMMON variable list ...
 Definition: Identical to the ZBASIC-PC DOM statement. Used to allocate memory
             for variables and for declaring variables common to chained
             programs.
             The order of the variables declared in COMMON is important when
             chaining programs. The COMMON statement must be exactly the same
             and in exactly the same order in other programs being chained.
COORDINATE --------------------------------------------------------------------
     Format: COORDINATE horizontal, vertical
             COORDINATE WINDOW
 Definition: Allows you to change the coordinate system used for graphic
             functions and statements.
             ZBASIC-PC defaults to a coordinate system of 1024 x 768.
             COORDINATE horizontal, vertical  Sets the relative coordinate
                                              system to the specified
                                              limits minus one. COORDINATE
                                              100,100 would allow setting the
                                              coordinate from 0 to 99 for both
                                              the horizontal and vertical.
             COORDINATE WINDOW                Sets the system to pixel
                                              coordinates. This allows you to
                                              calculate the grphic position by
                                              the actual resolution on the
                                              screen.
COS ---------------------------------------------------------------------------
     Format: COS(expression)
 Definition: Returns the Cosine of the expression in radians.
     Remark: Using COS in an expression wil force ZBASIC-PC to calculate that
             expression in floating point. COS is a scientific function. You
             may configure BCD scientific accuracy separately from both Double
             and Sigle precision immediately after lodaing ZBASIC-PC.
             Integer Cosine may be accomplished with a predefined ZBASIC-PC
             USR function; UER9 (angle in Brads). This returns the integer
             cosine of an angle in the range = 255(corresponding to =1). The
CSRLIN ------------------------------------------------------------------------
     Format: CSRLIN
 Definition: Returns the line where the cursor is positioned.
CVB ---------------------------------------------------------------------------
     Format: CVB(string)
 Definition: Returns the binary floating point value of the first n characters
             of the condensed number in string(depending on whether Single or
             Double precision is used).
             Double Precision    Returns the digits of accuracy defined in
                                 configure for double precision(default is 8
                                 digits ie. the first 8 string characters).
             Single Precision    Returns the digits of accuracy defined in
                                 configure for single precision(defualt is 4
                                 digits ie. the first 4 string characters).
             This function is the compliment of MKB$
             Null stings or 1 character strings return 0.
             Two character strings will return 2 digits accuracy. Four
             character strings will return four digits.
CURSOR ---------------------------------------------------------------------------
     Format: CURSOR (number)
 Definition: Alters the graphics mouse cursor. Value can vary between 0 and 4.
             Definitions are the same as for those in the Macintosh version.
CVI ---------------------------------------------------------------------------
     Format: CVI(string)
 Definition: Returns the binary integer value of the first 2 characters of
             string.
             This funtion is the complement of MKI$
       Note: Null string returns 0. One character strings will return the ASCII
             value. Two character strings will return an integer value
DATA --------------------------------------------------------------------------
     Format: DATA dataitem[, dataitem[, ...]]
 Definition: The DATA statement is used to hold information that may be read
             into variables using the READ statement. Data items are a list of
             string or numeric constants separated by commas and may appear
             anywhere in a program.
             No other statements may follow the DATA statement on the same
             line.
             Items are read in the order they appear in a program. RESTORE will
             set the pointer back to the beginning of the first DATA statement.
             RESTORE n will set the pointer to the nth data item.
       Note: Alphanumeric string information in a DATA statement need not be
             enclosed in quotes if the first charact is not a number.
             Leading spaces wil be ignored(unless in quotes). DATA statements
             can be included anywhere within a program and will be read in
             order.
DATE$ -------------------------------------------------------------------------
     Format: DATE$
             DATE$ = [month][,[day][,year]]
 Definition: Returns an eight digit character string containing the system date
             using the format MM/DD/YY, wher MM=Month, DD=Day, and YY=Year. Can
             also be used to set the date.
             Any of the three parameters can be omitted, in which case the
             parameter will not be changed. The following values are accepted:
             month:  1-12
               day:  1-31
              year:  1980-2099
       Note: If any of the specified parameters are not in the accepted range
             range, the date will not be changed.
DEF ---------------------------------------------------------------------------
     Format: DEFINT   letter[-letter][,letter[-letter],...]
             DEFSNG   letter[-letter][,letter[-letter],...]
             DEFDBL   letter[-letter][,letter[-letter],...]
             DEFSTR   letter[-letter][,letter[-letter],...]
 Definition: These statements define which variable type ZBASIC-PC will assume
             when encountering a variable name with letter as a first character
             and not followed by a type declaration symbol (% integer,! single,
             # double, $ string).
             DEFINT   Integer
             DEFSGL   Single Precision
             DEFDBL   Double Precision
             DEFSTR   String
             ZBASIC-PC will assume that all variables are integers unless
             followed by type delcaration symbol or defined by a DEF type
             statement.
             See configure in manual for another way of defining default
             variable types.
             letter         Letter from A to Z. Case is not significant.
             letter-letter  Defines an inclusive range of letters.
DEF COLOR ---------------------------------------------------------------------
     Format: DEF COLOR variable,variable,variable,variable
 Definition: This statement allows the user to define a color in 256 color
             modes. The first variable is the color to be defined (a value
             ranging from 0 to 255) and the following three variables the
             level of red, green and blue intensity respectively (values
             ranging from 0 to 63).
DEF FN ------------------------------------------------------------------------
     Format: DEF FN name [(variable[,variable[,...]])] = expression
 Definition: This statement allows the user to define a function that can be
             called by FN name.
             The expression may be a numeric or string expression and must be
             used to pass values to the function. The variable should be of
             the right type used in the function.
     Remark: One function may call another function as long as the function was
             called was defined first.
DEF LEN -----------------------------------------------------------------------
     Format: DEF LEN [=] number
 Definition: The DEF LEN statement is used to reset the default length of
             string variables until the next DEF LEN statement is encountered.
             The number must be from 1 to 255.
             If DEF LEN is not used string length default is 255 characters
             each. Each string will consume 256 bytes; 1 byte for length, the
             rest for characters.
     Remark: DEF LEN will allocate the specfied amount of memory to every
             string that is defined after it(unless defined differently in DIM
             or other DEF LEN).
             Strings that appear before DEF LEN statement are not affected.
       Note: Always allocate one extra character for strings used with INPUT.
             Never use a one character string for INPUT. The extra character
             position is needed for the carriage return.
DEF MOUSE ----------------------------------------------------------------------
     Format: DEF MOUSE [=] expression
 Definition: This statement sets the MOUSE function to return information from
             any one of four device drivers define by expression.
             DEF MOUSE = 0  Mouse
                         1  Joystick A
                         2  Joystick B
                         3  Light Pen
             If the DEF MOUSE statement is not used, the mouse driver is used
             as the default.
             If expression is not 0 to 3, then the MOUSE(n) function will
             always return 0.
       Note: ZBASIC-PC must be configured to support a mouse.
DEF PAGE ----------------------------------------------------------------------
     Format: DEF PAGE x1,y1 TO x2,y2
 Definition: This statement defines the size of the screen used in print
             operations where the parameters are as follows:
             x1,y1  = the upper left character position of the screen.
             x2,y2  = the lower right character position of the screen.
             ZBASIC-PC uses the screen size in scrolling the characters on the
             screen and in the CLS statement.
     Remark: This statement is most useful for displaying information and
             status on the screen that will not be erased by a CLS or by
             scrolling the characters. The area outside the defined screen can
             be accessed using LOCATE or PRINT @ to locate the cursor in this
             area. Then normal printing can be done, except that none of the
             screen will be scrolled. When done printing in this area, a
             LOCATE or PRINT@ is again used to go back to the normal area(CLS
             will also home the cursor inside the normal area).
       Note: In VGA graphics screens there are 30 lines of text rather than
             25. ZBASIC-PC automatically adjusts to DEF PAGE 0,0 to 79,29. It
             is possible to use various EGA and VGA fonts to allow screen text
             widths greater than 80 and lines greater than 25. In this case
             you should issue a matching DEF PAGE command.
DEF PAGE READ/WRITE -----------------------------------------------------------
     Format: DEF PAGE READ [=] expression
             DEF PAGE WRITE [=] expression
 Definition: ZBASIC-PC can access extra pages of memory available in TEXT MODES
             on the IBM PC. The number of pages varies according to the video
             employed and memory installed.
             ZBASIC-PC can write to and display any of the available screens.
             DEF PAGE READ = 0   Set display page to 0.
             DEF PAGE WRITE = 0  Set write page to 0.
     Remark: When the screen being displayed is not the same as the screen
             being written, the CLS statement does not work. Also, the auto
             scrolling feature does not work.
             However, CLS expression will work regardless of the displayed
             page.
DEF SEG -----------------------------------------------------------------------
     Format: DEF SEG [=] [address]
 Definition: Defines the current segement in memory. The address is an integer
             number between 0 and 65,535.
             Any subsequent use of a BLOAD, BSAVE, CALL, PEEK or POKE defintion
             specifies the offest into the segment(if the ZBASIC-PC segment
             option is not used in these commands).
DEF TAB -----------------------------------------------------------------------
     Format: DEF TAB [=] expression
 Definition: The DEF TAB statement is used to define the number of characters
             between tab stops for use in PRINT, PRINT# or LPRINT statements.
             Tab stops are the number of spaces to move over when the comma is
             encountered in a PRINT statement.
             The expression must be a number from 1 to 256. Tab default is 16.
DEF USER ----------------------------------------------------------------------
     Format: DEF USR n [=] address[, segment]
 Definition: This statement is used to tell ZBASIC-PC where a user function is
             to be located in memory. Address is used as the offset into the
             segment given by segemnt. If the segment is not given then
             ZBASIC's code segment is used.
    Example: DEFUSR1 = LINE 100
             Defines the subroutine at line 100 as user function 1.
DELAY -------------------------------------------------------------------------
     Format: DELAY expression
 Definition: The DELAY statement will cause a program to pause a specified
             amount of time.
             The expression set the delay in milliseconds, thousandths of a
             second.
     Remark: The BREAK key is not scanned during DELAY. Any negative expression
             will cause delays in excess of 32 seconds(the unsigned value).
             Note that DELAY -1 will delay over 65 seconds(unsigned -1 = 65535.
             There may be a slight variation from machine to machine due to
             processor speed, interrupts, hardware differences, etc.
DIM ---------------------------------------------------------------------------
     Format: DIM [len]var[type][(number[,number..])][,...]
 Definition: The DIM statement is used to allocate memory for variables and
             array variables and to define common variables for chained
             programs.
             len      Defines the length of a string(how many characters it may
                      hold). This is optional and defines the length of all the
                      following string variables in that DIM statement or until
                      a new length is encountered in that statement. The
                      default is 255 characters unless changed by a previous
                      DEF LEN.
             var      The name of a variable(any variable type).
             type     Forces the variable to be that of type.
                      % integer           ! Single Precision
                      # Double Precision  $ String
             number   The maximum number of elements that a dimension may
                      contain from 1 to 32,767 elements(add one if array base
                      option is set to zero(default)). Only numbers may be used
                      not variables.
             If no len is defined, the last given length in that DIM statement
             is used.
DO ----------------------------------------------------------------------------
     Format: DO
               .
               .
             until expression
 Definition: The DO statement is used to define the beginning of a loop with
             the UNTIL statement defining the end.
             Program functions and statements appearing between the DO and
             UNTIL will be executed until the expression at the UNTIL statement
             is TRUE.
     Remark: The statements in a DO loop will be executed at least once.
ELSE --------------------------------------------------------------------------
     Format: IF-THEN-ELSE line or label
             IF-THEN-ELSE statement
 Definition: ELSE is used with an IF statement to route control on a false
             condition.
             ELSE may refer to a linenumber or label or it may be followed by
             one or more statements that will be executed if the condition in
             the IF statement is FALSE.
END ---------------------------------------------------------------------------
     Format: END [= expression]
 Definition: The END statement is the normal way to exit a ZBASIC-PC program.
             An error return code can be sent using the END = expression. This
             value can then ne interrogated by the batch subcommands IF and
             ERRORLEVEL. To force a reset of the video mode to the state
             before the program was executed add 256 to expression.
             If the END = expression statement is not used to terminate a
             program, then the error code returned is 0.
END FN ------------------------------------------------------------------------
     Format: long fn
               .
               .
             END FN [= expression]
 Definition: Marks the end of a LONG FN statement.
             The optional expression MUST be numeric for numeric functions
             (!%#&) and MUST be string ($) for string functions.
     Remark: If an END FN is omitted in a LONG FN construct, a structure error
             will occur. You must exit a function from an END FN otherwise
             problems will occur internally.
       Note: Loops like FOR-NEXT, DO-UNTIl or WHILE-WEND must be entirely
             contained within a LONG FN-END FN. Do NOT exit a function except
             at the END FN.
END IF ------------------------------------------------------------------------
     Format: long if expression
               .
             xelse
               .
             END IF
 Definition: This is an end marker for the LONG IF statement.
             Program execution will continue normally at the END IF after
             completion of a LONG IF or XELSE.
     Remark: If and END IF is omitted in a LONG IF construct, a structure
             error will occur.
END SELECT --------------------------------------------------------------------
     Format: SELECT [CASE][expression]
               CASE[IS] relational expression[, relational expression][,...]
                 statement[:statement...]]
               CASE[IS] condition[,condition][,...]
                 statement[:statement...]]
               CASE boolean expression
                 statement[:statement...]]
               CASE ELSE
                 statement[:statement...]]
             END SELECT
 Definition: END SELECT is the end marker for the SELECT/CASE structure.
             When SELECT/CASE is encountered, the program checks the value of
             the controlling expression or variable, finds the CASE that
             compares true and executes the statements directly following
             the CASE statement. After these statements are performed, the
             program continues at the line after the END.
EOF ---------------------------------------------------------------------------
     Format: EOF(number)
 Definition: Returns true if an end-of-file condition exists for filenumber,
             returns zero if the end-of-file has not yet been reached. With
             READ#, the check is for the physical end-of-file, with INPUT#
             the check is for the logical end of file.
     Remark: Some sequential file structures can cause problems with the EOF
             function. Normally sequential files are terminated with an
             ASCII character 1A(hex), however others may lack this(for example
             files created with COPY CON). In this case you may prefer the
             alternative method(see ERROR).
ERRMSG$ -----------------------------------------------------------------------
     Format: ERRMSG$(expression)
 Definition: Returns the error message string for the number specified by
             expression. In most cases you will use the number returned by
             the ERROR function when a disk error has occured.
     Remark: ZBASIC-PC will display the errors for you unless you use the ON
             ERROR disk trapping options.
             The ERROR function is commonly used for error trapping and display
             purposes. The expression is stored as follows:
               The low byte is used for the ERROR    (ERROR AND 255)
               The high byte is used for the file#   (ERROR>8)or(ERROR/256)
ERROR -------------------------------------------------------------------------
     Format: ERROR
 Definition: Returns the number of an ERROR condition, if any.
             Zero is returned if no error has occured.
             This function is available to proammers who wish to trap disk
             errors using the ON ERROR statement.
             ERROR=11  An error happened with RMDIR MKDIR or CHDIR.
             Errors encountered depend on the statement but usually are related
             to that statement, ie. if you get an error 11 doing RMDIR either
             the directory didn't exist, the wrong diskette was used, a write
             protect was on the disk or the wrong pathname was used.
     Remark: If you do disk error trapping. ERROR must be reset to zero after
             a disk error occurs or ERROR function will continue to return
             and error value.
             16 - Cannot create lock - network file error.
             17 - Fatal network error - network file error.
ERROR = -----------------------------------------------------------------------
     Format: ERROR [=] expression
 Definition: Allows the programmer to set or reset ERROR conditions for the
             purpose of disk error trapping.
             IMPROTANT NOTE: If you do the disk error trapping, ERROR must be
             reset to zero after a disk error occurs or ERROR function will
             continue to return an error value.
     Remark: ERROR may also be used as a function.
EXP ---------------------------------------------------------------------------
     Format: EXP (expression)
 Definition: Returns e raised to the power of expression. This function is the
             compliment of LOG. The BCD internal constant of the value of e is
             2.71828182845904523536028747135266249775724709369995957
             The result will be rounded to the digits of precision configured
             for Double Precision accuracy.
     Remark: This is a scientific function. See Configure for information
             about configuring scientific accuracy.
FILES -------------------------------------------------------------------------
     Format: FILES [filespec]
 Definition: Prints a directory of the files in the directory specified by
             filespec.
             If filespec is not used the current directory contents are used.
     Remark: COMMAND.COM must be available.
FILL --------------------------------------------------------------------------
     Format: FILL expressionX, expressionY
 Definition: The purpose of FILL is to paint an area of the screen in the
             current color. The point defined by the expressions are:
               expressionX(Horizonal position) and expressionY(vertical pos)
             FILL will search for the uppermost point in the contained area
             that has the background color, then start filling from left to
             right and down. For this reason, irregular shapes may not fill
             completely with on fill command. It may be necessary to use a
             fill statement for each appendage.
FIX ---------------------------------------------------------------------------
     Format: FIX(expression)
 Definition: Truncates the digits on the right side of the decimal point.
     Remark: FIX works the same as INT in ZBASIC-PC, except that FIX will
             consider an expression floating point.
             FRAC is the opposite of FIX. It returns the fraction part of the
             number.
FN ----------------------------------------------------------------------------
     Format: FN name [(expression1[, expression2[, ...]])]
 Definition: FN calls a function by name which was previously defined by
             DEF FN or LONG FN.
             The name of the function must follow the syntax of variable names,
             that is, a string FN must have a name with a $, an integer FN
             must have a name with a %, etc. FN may not be used before it is
             defined with DEF FN or LONG FN.
             The expressions must match the variable types as defined by DEF FN
             or LONG FN. Numeric expressions are not a problem, string
             allow only simple strings.
     Remark: This function is useful for saving program space and for making a
             program easier to read.
FOR ---------------------------------------------------------------------------
     Format: FOR variable = expression1 to expression2 [STEP expression3]
               .
               .
             NEXT [variable][,variable ...]
 Definition: Permits the repeated execution of commands within the loop.
             A FOR/NEXT loop will automatcially increment variable by the
             amount set by STEP and compare this to the end value, expression2,
             exiting the loop when var exceeds this value after adding STEP.
             Default for STEP is 1.
             Note the loop will be executed at least once with the value of
             expression1.
       Note: If STEP is set to zero, the program will enter an endless loop.
             If the variable is an integer, do not allow the loop to exceed
             32,767 or you will enter an endless loop(unsigned integer).
FRAC --------------------------------------------------------------------------
     Format: FRAC(expression)
 Definition: FRAC returns the fractional part of expression. THe digits to the
             left of the decimal point will be truncated.
FRE ---------------------------------------------------------------------------
     Format: FRE(parameter)
 Definition: Returns the amount of free memory left in the system (divided by
             16). Multiply the number returned by 16 to get the amount of free
             memory in bytes. Also can be used to return the free or total
             space on a disk storage device.
               -1       Returns system free memory.
               -2       Returns DOS version.
                0       Returns free space on default drive.
                1-26    Returns free space on a given drive(1=A,2=B,3=C,4=D...)
             Returns a value of -1 for parameters 0-126 if device is not
             available.
     Remark: It is imperative that these variables be double precision to get
             the amount of free memory.
             Since there is no "Garbage Collection" in ZBASIC-PC, this function
             does not compact memory or return the remaining string space.
             String space is allocated at compile time.
GET ---------------------------------------------------------------------------
     Format: GET(x1,y1)-(x2,y2), variable[array(index[,index...,])]
 Definition: Stores a graphic image from the screen into a variable array so
             that it may be retrieved later and put ot the screen with PUT.
             GET and PUT are extremely fast and useful for graphic animation.
              x1,y1  Coordinates of the upper-left-corner of the graphic image.
              x2,y2  Coordinates of the lower-left-corner of the graphic image.
             Coordinates are pixel coordinates; use with COORDINATE WINDOW.
             The image is normally stored in memory specified by an integer
             array since it is easier to calculate how much memory is required
             this way but other variables may be used.
             To calculate the number of bytes to DIM for a graphic image, use
             this equation. Bits-per-pixel has to do with color available.
               6+((y2-y1)+1)*((x2-x1+1)*bpp+7)/8
               Type        Mode      Colors       Bits Per Pixel
               CGA         5         4            2
               CGA         7         2            1
               EGA         16-19     3-16         2(64k or less)
               EGA         16-19     16           4(more than 64k)
               VGA         21        2            1
               VGA         22        16           4
               MCGA        23        256          8
               HERCULES    20        1            1
     Remark: IMPORTANT NOTE: Failure to DIM enough memory for the variable
             storing the graphic images may result in unpredictable system
             problems.
GOSUB -------------------------------------------------------------------------
     Format: GOSUB line or label
 Definition: GOSUB will call that part of a program starting with line or label
             and return to the next statement following the GOSUB with RETURN
             is encountered.
     Remark: On multiple statment lines, a RETURN will return control to the
             next statement on the the line following the originating GOSUB.
             To avoid errors, be certain there is a line with the number or
             label that you GOSUB. All subroutines must be terminated with a
             RETURN statement.
             NOTE: If ZBASIC-PC encounters a RETURN without a matching GOSUB,
             it will return to the operating system or the editor. ZBASIC-PC
             does not check for stack overflow which may cause errors if
             subroutines do not end with a RETURN.
GOTO -------------------------------------------------------------------------
     Format: GOTO line or label
 Definition: GOTO will transfer control to a line or label in a program.
     Remark: A line error will occur during compile if the destination line or
             label cannot be found.
HEX$ -------------------------------------------------------------------------
     Format: HEX$(expression)
 Definition: The HEX$ function converts a numeric expression to a four
             character HEXadecimal string.
     Remark: Floating point numbers will be truncated to integers.
IF ---------------------------------------------------------------------------
     Format: IF expression THEN line[or label][ELSE line[or label]]
             IF expression THEN statement [:statement ...][ELSE statment ...]
 Definition: The IF statement allows a program to do a number of things
             based on the result of expressoin:
              1. Branch to  a line or lable after the THEN if a condition is
                 true; expression -0
              2. Execute statement(s) after the THEN if a condition is true;
                 expression -0
              3. Branch to a line or label after the ELSE if a condition is
                 false; expression = 0
              4. Execute statement(s) after the ELSE if a condition is false;
                 expression = 0.
     Remark: Complex strings will generate an error if used in an IF
             statement.
INDEX$ -----------------------------------------------------------------------
     Format: INDEX$(expression) = string
             INDEX$I(expression) = string
             INDEX$D(expression)
 Definition: INDEX$ is a special array. expression indicates an element
             number.
             INDEX$(n)=simple string   Assigns a value to INDEX$(n).
             INDEX$I(n)=simple string  Move element n(and all consecutive
                                       elements) up and INSERT simple string at
                                       INDEX$ element n.
             INDEX$D(n)                Delete element n and move all
                                       consecutive elements down to fill the
                                       space.
INDEXF -----------------------------------------------------------------------
     Format: INDEXF(string[,expression])
 Definition: INDEXF is a special INDEX$ array function used to FIND a leading
             string within an INDEX$ array quickly.
             If INDEX$(1000) equaled "hello", then X=INDEXF("hello") would
             return 1000.
             If X = INDEXF("llo") X would equal -1 since "llo" would not be
             found. The leading characters are significant.
INKEY$ -----------------------------------------------------------------------
     Format: INKEY$
 Definition: INKEY$ returns the character of the last key pressed or an empty
             string if no key was pressed.
    Example: Y$ = INKEY$
     Remark: When using INKEY$ for character entry, avoid having the TRON
             function active as this may cause pressed keys to be missed.
             Certian keys return more than one character, such as the function
             left cursor, right cursor, etc.  In this case, the first
             character in the returned string will be a null"00HEX" and the
             second character will be the value of the key pressed.
             Key Codes Returned by INKEY$ for MSDOS
             A = Alternate  C = Control  S = Shift
             The characters below are the 2nd character.
             Key N A C S  Key N A C S  Key N A C S  Key N A C S
             --- - - - -  --- - - - -  --- - - - -  --- - - - -
             UpA H - - -  F1  ; h ^ T  F6  @ m c Y  Ins R - - 0
             DnA P - - -  F2  < i _ U  F7  A n d Z  End O - u 1
             LA  K - s    F3  = j ` V  F8  B o e [  Hme G - w 7
             RA  M   t    F4  > k a W  F9  C p f \  PUp I   o 9
                          F5  ? l b X  F10 D q g ]  PDn Q   v 3
                                                    Del S     .
INKEY$ -----------------------------------------------------------------------
     Format: INKEY$(expression)
 Definition: This statement is used to enable ro diable function key
             interrupts.
             The function keys can be used to control program flow with
             ON INKEY$ GOTO(see ON INKEY$ statement).
             The expression does the following:
               0    disables function keys
               <> 0 enables function keys
             Enabling or disabling the function keys deos not destroy the
             previous ON INKEY$ key definitions, it simply decides whether or
             not ZBASIC-PC should check for function keys.
    Example: ON INKEY$(1) GOTO "F1"
     Remark: The ability to turn the function keys on and off iss
INP --------------------------------------------------------------------------
     Format: INP(expression)
 Definition: The INP function is used to read an input port. The function
             returns the value that is currently at port expression.
     Remark: This function requires a knowledge of your computer hardware.
INPUT ------------------------------------------------------------------------
     Format: INPUT[(@or%)(exprx,expry)][;][!][&expr,]["string";]var[,var...]
 Definition: The INPUT statement is used to input values(string or numeric)
             from the keyboard into variables.
             Multiple variables must be separated by commas. If not value is
             input, a zero or null string is returned.
             @(exprx,expry)    Places the cursor at text location horizonal,
                               vertical or column(x) and row(y).
             %(exprx,expry)    Places the cursor at graphics coordinate
                               horizonat, vertical.
             ;                 Supresses carriage return/line feed
             !                 Automatic Carrige return after maximun
                               characters entered. User does not need to
                               press ENTER.
             &expr,            Sets the maximum number of characters to be
                               input. Default is 255. Will not allow more
                               than expr characters.
             "string";         Optional user prompt will replace the question
                               mark(and supress it).
             var               May be any variable type integer, single or
                               double or string.
       Note: If more than one variable is INPUT, commas must be included form
             the user to separate input. If all the variables are not input, the
             value of those variables will be null. Replace INPUT with LINEINPUT
             whenever there is a need to input quotes, commas and control
             characters(except with multiple variables). String lengths MUST be
             one greater than manimum INPUT length since a CHR$(13) is added
             (interally). Never define a string used in an INPUT or LINEINPUT
             as one.  The variable stack will become corrupted.
    Example: INPUT A$
             INPUT "Name";A$
             INPUT;A$
             INPUT &10,A$
             INPUT ;&3,I%
             INPUT !%&10,A$
             INPUT ;!&10,"Name:",A$
             LINEINPUT;!&5,"Name:",A$
INPUT# -----------------------------------------------------------------------
     Format: INPUT#expression, var[, var[,...]]
 Definition: This statement will read INPUT from a disk or other device
             specified by expression until a carriage return, comma, EOF or
             255 characters are encountered.
             Remember that DOS delimits each sequential record with a carriage
             return/linefeed combination. The carraige return/linefeed is not
             passed to var.
             Commans and leading spaces may be read into a string variable if
             the data on disk was enclosed in quotes, otherwise leading
             spaces and line feeds will be ignored.
             See LINEINPUT# for wasy of inputting commas, quotes and some
             control characters.
INSTR ------------------------------------------------------------------------
     Format: INSTR(expression,string1,string2)
 Definition: Defines first occurrence of string2 in string1, starting at
             search position specified by expression.
             expression       Starting position of the search(default is 1).
             string1          String to be searched.
             string2          String  to search for.
     Remark: If string is not found, 0 is returned, otherwise the starting
             position is returned.
INT --------------------------------------------------------------------------
     Format: INT(expression)
 Definition: Truncates all didgits to the right of the decimal point of
             expression.
     Remark: INT works the same as FIX in that expression will be restricted
             to the integer range of -32,768 to +32,767 only when the expression
             has not been defined as floating point.
             INT is simply a function that truncates an expression to a whole
             number.
KILL -------------------------------------------------------------------------
     Format: KILL simplestring
 Definition: Kill will erase a disk file specified by simplestring.
             KILL functions either as a command or from within a program. The
             use of "wildcards" is NOT allowed, thus KILL ".DOC" is not
             allowed.
     Remark: Use this statement with caution. When a file has been killed it is
             normally unrecoverable.
LEFT$ ------------------------------------------------------------------------
     Format: LEFT$(string,expression)
 Definition: LEFT$ returns the left most characters of string defined by
             expression. THe string will not be altered.
LEN --------------------------------------------------------------------------
     Format: LEN(string)
 Definition: Returns the number of characters that are stored in a string
             constant or string variable. If 0 is returned it indicates a null
             (empty) string.
     Remark: The maximum length of a string is 255 characters. You may set the
             length of strings in ZBASIC-PC using DIM or DEF LEN.
             Since the first character of a string stored in memory is the
             length byte, PEEK(VARPTR(var$)) will also return the length of a
             string.
             The memory required for a string variable is the defined length,
             plus one for the length byte(256 bytes if not defined).
LET --------------------------------------------------------------------------
     Format: [LET] variable = expression
 Definition: LET is an optional statement that may be used to assign an
             expression to a variable.
LINE -------------------------------------------------------------------------
     Format: LINE linenumber or label
 Definition: Returns the starting address of a compile line in memory.
             Normally used with CALL to execute machine language subroutines
             created with MACHLG.
     Remark: This statement is useful for calling machine language subroutines
             embedded in your program or for calculating the number of bytes
             used by program lines.
LINE INPUT -------------------------------------------------------------------
     Format: LINE INPUT[(@or %)][;][!][&expr2,][&expr,]["string";]var$
 Definition: The LINE INPUT statement is used to input characters from the
             keyboard into a string variable. It is different from INPUT in
             that quotes, commas, and some control characters may also be
             entered. LINE INPUT is terminated when the ENTER key is pressed.
             @(exprx,expry)    Places the cursor at text location horizonal,
                               vertical or column(x) and row(y).
             %(exprx,expry)    Places the cursor at graphics coordinate
                               horizonat, vertical.
             ;                 Supresses carriage return/line feed
             !                 Automatic Carrige return after maximun
                               characters entered. User does not need to
                               press ENTER.
             &expr,            Sets the maximum number of characters to be
                               input. Default is 255. Will not allow more
                               than expr characters.
             "string";         Optional user prompt will replace the question
                               mark(and supress it).
             var$              Only string varaibles may used with LINE INPUT.
       NOTE: String lengths must be at least one greater than the number of
             characters being input, otherwise a string overflow condition will
             destroy subsequent variables. Never use a one character string with
             LINE INPUT.
LINE INPUT# ------------------------------------------------------------------
     Format: LINE INPUT#expression, variable$
 Definition: This statement will input ASCII or TEXT data from a disk file
             specified by expression until ENTER, EOF, or 255 characters are
             encountered.
             Useful for accepting commas, quotes and other characters that
             INPUT# will not accept.
LOC --------------------------------------------------------------------------
     Format: LOC(expression)
 Definition: Returns the byte pointer within the current RECORD of the
             filenumber specified by expression.
     Remark: The LOC position is incremented to the next file position
             automatically when READ#, WRITE#, INPUT#, LINE INPUT# or PRINT#
             are used. REC(filenumber) returns the current RECORD. LOF returns
             the last record in the file.
LOCATE -----------------------------------------------------------------------
     Format: LOCATE [x,y][,[cursor on/off][,[stratline][,stopline]]]
 Definition: This statement handles all of the cursor functions.
              x,y       Horizontal,vertical coordinate on the screen.
              on/off    0 = cursor off, not 0 = cursor on.
              startline start line for cursor character 0-13(how thick)
              stopline  stop line for cursor character 0-13.
              For the monochrome adapter, the values of these two parameters can
              be from 0 to 13. Zero specifies the top of the character block and
              13 specifies the bottom. With the graphics adaptor, 0 is the top
              and 7 is the bottom. The cursor can be turned on and off without
              affecting the start and stop lines.
    Example: LOCATE 0,20,0
             LOCATE 0,20
             LOCATE ,,1,3,4
     Remark: The x,y orientation can be reconfigured to be y,x(row,column).
             Also note that ZBASIC-PC defaults to accesing character cells
             using numbers from 0 to 79 across and 0 to 24 down.
             This function is also useful with CLS LINE and CLS PAGE for
             clearing the screen to the end of line and end of page.
LOF --------------------------------------------------------------------------
     Format: LOF(filenumber/-port[,record length])
 Definition: Returns the last valid RECORD number for the file specified by
             expression. LOF stand for Last-Of-File. If a record length of one
             is used it will return the length of the file in bytes.
             If a negative port number is used, it will return the nubmer of
             characters in the current serial buffer(see OPEN"C").
     Remark: LOF returns the last record in the file. The default record length
             is 256 and may need to be changed to make LOF function properly.
LOG --------------------------------------------------------------------------
     Format: LOG(expression)
 Definition: Returns the natural logarithm of expression (LN). LOG is the
             compliment of EXP.
     Remark: LOG is a scientific function. Scientific prescision may be
             configured by the use differently from both single and double
             precision.
LONG FN ----------------------------------------------------------------------
     Format: LONG FN name[(var[,var[,...]])]
               .
             END FN [= expression]
 Definition: LONG FN is similar to DEF FN but allows the function to span
             over several lines.
             The variables being passed to the function must not be arrays.
             The expression must be numeric for numeric and string for string
             functions.
LONG IF ----------------------------------------------------------------------
     Format: LONG IF expression
               .
             [XELSE]
              .
             ENDIF
 Definition: LONG IF allows multiple line IF-THEN-ELSE structures. Two things
             happen based on the result of expression:
             If the expression is TRUE     Executes all the statements up to
                                           the XELSE(if present) and then exits
                                           at the ENDIF.
             IF the expression is False    Executes all the statements between
                                           the XELSE and END IF and then exits
                                           at the END IF. If XELSE is not used
                                           it will simply end at the END IF.
     Remark: No loop may be executed within a LONG IF construct unless it is
             completely contained between a LONG IF and XELSE or between the
             XELSE and END IF. The entire LONG IF construct must be completely
             contained within loops or nested loops in order to compile
             properly.
LPRINT -----------------------------------------------------------------------
     Format: LPRINT[variables,constants...]
 Definition: The LPRINT statement sends output to a printer.
             An alternative to LPRINT is to open the printer(s) as a sequential
             outp file. Then use PRINT# statements rather than LPRINT. Due to
             lower handshaking requirements, this can produce faster thoroughput
             times, especially in situations like graphic output to dot matrix
             printers. Be sure to close the printer device when finished.
             To use more than one printer you may also use OPEN"O",1,"LPT2" and
             use PRINT#1,[variables, constants...].
       Note: Many laser printers do not accept the above technique.
MACHLG -----------------------------------------------------------------------
     Format: MACHLG{[byes,...]}or{[words,...]}or{[variables][,...]}
 Definition: The MACHLG statement is used to insert bytes directly into a
             compiled program. These bytes may be machine language programs,
             variables or other items.
             It may be used to insert machine language into memory without
             using POKE.
             bytes     numbers from 0 to 255
             words     numbers from 0 to 65535. They are stored in standard
                       format.
             variables Will create address where the variable is used.
       Note: ZBASIC-PC uses registers when calculating elements of an array
             variable. Contents of these registers may be destroyed.
MAYBE ------------------------------------------------------------------------
     Format: MAYBE
 Definition: MAYBE is a random function that returns either a TRUE(-1) or
             FALSE(0) with equal probability.
             MAYBE is faster than RDN.
             Provides 50% random factor.
MEM --------------------------------------------------------------------------
     Format: MEM
             MEM letter
             MEM STR
             MEM BCD
             MEM ARR array(dummy)
 Definition: This function returns the segment address of specific portions of
             a ZBASIC-PC compiled program.
             The segments returned are as follows:
             MEM             Memory remaining in INDEX$ segment
             MEMC            Code segment
             MEMD            Data segment
             MEME            Extra segment
             MEMS            Stack segment
             MEMI            Index$ segement
             MEM STR         Simple strings
             MEM BCD         BCD variables
             MEM ARR A$(1)   Array A$ begins
     Remark: When using the MEM ARR function, the string array is given only one
             dummy argument regardless of the number of dimensions.
MID$ -------------------------------------------------------------------------
     Format: MID$(string, expr1[, expr2])
 Definition: Returns the contents of string starting at position expr1 and
             expr2 characters long.
               string     The string from which the copy will occur
               expr1      The distance from the left where the copy will begin
               expr2      Optional prarameter that determines how many
                          characters will be copied. If omitted, all characters
                          from expr1 to the end of the string will be copied.
MID$= ------------------------------------------------------------------------
     Format: MID$(string1,expr1[, expr2]) = string2
 Definition: Replace a portion of a string1 starting at expr1 with expr2
             characters of string2.
             string1   Target string. String2 will be insterted or laid over
                       this string.
             string2   String to be inserted or laid over string1.
             expr1     Distance from the left of string1 where overlay is to
                       begin.
             expr2     How many characters of string2 to insert into string1.
                       Using 255 will assure that all characters are used.
MKB$ -------------------------------------------------------------------------
     Format: MKB$(expression)
 Definition: Returns a string which contains the compressed floating point
             value of a ZBASIC-PC BCD expression.
             This function works with either single or double precision. The
             amount of string space used will be in double precision and will
             vary depending on the digits of precision configured.
MKDIR ------------------------------------------------------------------------
     Format: MKDIR pathname
 Definition: Creates a new directory.
       Note: When an error is encountered, ERROR is set to 11.
MKI --------------------------------------------------------------------------
     Format: MKI$(expression)
 Definition: Returns a two character string which contains a two byte integer
             specified by expression.
MOD --------------------------------------------------------------------------
     Format: expression1 MOD expression2
 Definition: MOD returns the remainder of an integer division with the sign of
             expression1.
MODE -------------------------------------------------------------------------
     Format: MODE(expression)
 Definition: MODE sets the system screen attributes. MODE can be set in the
             range 0-23.
             Color Graphics Adaptor (CGA)                  MODE 0-7
             Monochrome Dispaly & Printer Adaptor (MDPA)   MODE 2
             CGA Black and White                           MODE 8-15
             EGA                                           MODE 16-19
             Hercules Graphics Cards                       MODE 2 & 20
             VGA                                           MODE 21-22
             MultiColor Graphics (MCGA)                    MODE 23
     Remark: To determine what board is installed, see CARDTYPE & USR0.
      Table: MODE   TEXT Cols   Graphics              Pages    Colors
              0       40x25     Character               8        16
              1       40x25     40x25                   1        16
              2       80x25     Character               4        16
              3       80x25     80x25                   1        16
              4       80x25     Character               4        16
              5       40x25     320x200 (1)             1         4
              6       80x25     Character               4        16
              7       80x25     640x200 (1)             1         2
              8       40x25     Character               8       B/W
              9       40x25     40x25                   1       B/W
             10       80x25     Character               4       B/W
             11       80x25     80x25                   1       B/W
             12       80x25     Character               4       B/W
             13       40x25     320x200   (1)           1       B/W
             14       40x25     Character               4       B/W
             15       80x25     640x200   (1)           1       B/W
             16       40x25     320x200   (3)           2/4/8    16
             17       80x25     640x200   (3)           1        16
             18       80x25     640x350   (3)           1/2       3
             19       80x25     640x350   (3)           1      4/16
             20       80x25     720x348   (2)           2         2
             21       80x30     640x480   (4)           1       B/W
             22       80x30     640x480   (4)           1        16
             23       40x25     320x200   (4)           1       256
             24       80x25     640x400   (5)           1       256
             25       80x30     640x480   (5)           1       256
             26       100x37    800x600   (5)           1       256
             27       100x37    800x600   (5)           1       256
             28       128x48   1024x768   (5)           1       256
             29       128x48   1024x768   (5)           1       256
             30       160x64  1280x1024   (5)           1       256
             31       160x64  1280x1024   (5)           1       256
             32       80x60   Character   (5)           1       256
             33       132x25  Character   (5)           1       256
             34       132x43  Character   (5)           1       256
             35       132x50  Character   (5)           1       256
             36       132x60  Character   (5)           1       256
            (1) CGA  (2) Hercules  (3) EGA  (4) VGA/MCGA (5) VESA
MOUSE ------------------------------------------------------------------------
     Format: MOUSE(expression)
 Definition: This function returns information from the current mouse driver
             as defined by the DEF MOUSE statement. expression will determine
             the value returned as follows:
               MOUSE(0)    Resets and returns true if installed.
               MOUSE(1)    Returns X position.
               MOUSE(2)    Returns Y position.
               MOUSE(3)    Returns button status.
               MOUSE(4)    Show mouse cursor.
               MOUSE(5)    Hide mouse cursor.
             The X and Y positions returnred are in terms of ZBASIC-PC's
             coordinate system.
             If expression is not 0 to 3, the 0 is returned. Alos, MOUSE(0) is
             supported only for the mouse driver (DEF MOUSE=0).
     Remark: The MOUSE function does not operate exactly the same for all
             DEF MOUSE types. Use the following for more specific information:
               DEF MOUSE=0     - MOUSE DRIVER
                 MOUSE(0)   Resets the mouse hardware and software and returns
                            0(false) if hardware is not installed, otherwise
                            returns -1(true). ZBASIC-PC always initally resets
                            the mouse.
                 MOUSE(1)   Returns the horizontal position of mouse.
                 MOUSE(2)   Returns the vertical position of mouse.
                 MOUSE(3)   Returns the button status from 0 to 7.
                            Left              = 1
                            Middle            = 4
                            Right             = 2
                            Left/Middle       = 5
                            Middel/Right      = 6
                            Left/Middle/Right = 7
             Note that ZBASIC-PC has to be configured to support the mouse.
               DEF MOUSE=1 or 2 - JOYSTICK DRIVER
                 MOUSE(1)   Returns Horizontal position of Joystick.
                 MOUSE(2)   Returns vertical position of Joystick.
                 MOUSE(3)   Returns button status from 0 to 3. 0 if both
                            buttons up and 3 if both buttons down.
               DEF MOUSE=3       - LIGHT PEN DRIVER
                 MOUSE(1)   Returns last horizontal position. If pen switch is
                            currently down,, the X and Y positions are updated
                            and the new X position is returned, else the last
                            position is returned.
                 MOUSE(2)   Returns last vertical position, operating the same
                            as MOUSE(1).
                 MOUSE(3)   Returns pen switch status from 0 to 1(0 if light
                            pen switch not down/not triggered, 1 if down or
                            triggered). If pen switch is down, the X an Y
                            position are updated.
             If a mouse driver is installed, the light pen driver will no
             longer work. The MOUSE function wil then return the mouse
             position and buttons instead of the light pen, still updating a
             position only when a button is pressed.
             MOUSE(4) and MOUSE(5) are used to show and hide the mouse cursor.
     Remark: It is important to note that the number of calls to one of the
             mouse statements must be equal to the number of calls to the
             other to get the cursor to the same states. For example, if
             MOUSE(5) is called 10 times to hide the cursor, then MOUSE(4)
             must be called 10 times to show the cursor.
             Also, ZBASIC-PC initially resets the mouse and leaves the cursor
             off. One call to MOUSE(4) will turn the cursor on.
             The cursor is seen in screen MODE 5,,7,,13,,15,16.
NAME -------------------------------------------------------------------------
     Format: NAME string1 AS string2
 Definition: Renames a file with a filename of string1 to string2. Sames as
             RENAME statment except for syntax.
NEXT -------------------------------------------------------------------------
     Format: For var=expression1 TO expression2 [STEP expression3]
               .
             NEXT [variable[,variable...]]
 Definition: The NEXT statement is used as the end marker of a FOR loop. There
             must be a matching NEXT for every FOR, otherwise a structure
             Error will occur at compile time.
     Remark: The variable(s) following the NEXT statement are optional.
             However, if used they must match the corresponding FOR
             variable(s).
             A FOR loop will execute at least once.
             A structure error will specify the line number if there is an
             extra NEXT, or will specify 65535 if a NEXT is missing.
NOT --------------------------------------------------------------------------
     Format: NOT expression
 Definition: NOT returns the opposite of expression. True is False, False is
             True. This is equivalent to changing a logical true(-1) to a
             logical false(0) and vice versa.
             With Boolean(binary) operations, the NOT function will toggle all
             bits in expression. That is, all bits that are one will be changed
             to 0 and all 0 bits will be changed to 1.
OCT$ -------------------------------------------------------------------------
     Format: OCT$(expression)
 Definition: OCT$ returns a 6 character string which represents the Octal
             value(base 8) of the result of expression truncated to an
             integer. Octal digits are from 0-7.
ON ERROR ---------------------------------------------------------------------
     Format: ON ERROR GOSUB line/label
             ON ERROR RETURN
             ON ERROR GOSUB 65535
 Definition: The ON ERROR allows the use to enable and disable disk error
             trapping. If ON ERROR is not used, ZBASIC-PC will display disk
             errors as they occur and give the user the option of continuing
             or stopping.  Options are:
               ON ERROR GOSUB 65535
                 Enables user disk error trapping. Erros are returned using
                 the ERROR function. You must check for errors after each
                 disk operation.
               ON ERROR GOSUB line
                 IF a disk error occurs the program does a GOSUB to line or
                 label.
               ON ERROR RETURN
                 Disable user disk error trapping. ZBASIC-PC will trap error
                 and display message to user.
     Remark: See ERROR and ERRMSG$ and "Files". Always remember to set
             ERROR = 0 after a disk error occurs when you are doing the disk
             error trapping. Failure to do this will cause ZBASIC-PC to
             return an error.
ON GOSUB ---------------------------------------------------------------------
     Format: ON expression GOSUB line[,line[,line...]]
 Definition: The ON GOSUB statement is used to call one of several subroutines
             depending on the value of expression.
             The ON statement will call the first subroutine if the expression
             evaluates to one, to the third subroutine if the expression
             evaluatges to three and so on.
             The RETURN statement at the end of a subroutine will return the
             program to the statement immediately following the ON GOSUB.
     Remark: ZBASIC-PC will truncate expression to an integer.
             If expression <=0 or > (number of line numbers listed), the
             program wil continue on to the next statement in the program.
ON GOTO ----------------------------------------------------------------------
     Format: ON expression GOTO line[, line[, line...]]
 Definition: The ON GOTO statment is used to branch or jump to one of several
             portions of a program depending on the value of expression.
             The ON statment will jump to the first line if the expression
             evaluates to 0, to the third if the expression evaluates to 3 etc.
     Remark: ZBASIC-PC will truncate expression to an integer.
             If expression <=0 or > (number of line numbers listed), the
             program wil continue on to the next statement in the program.
ON INKEY$ --------------------------------------------------------------------
     Format: ON INKEY$(expression) GOTO line#/label
             ON INKEY$(expression) RETURN
 Definition: This statement is used to control the action when a function key
             is pressed.
             When using the ON INKEY$ statement, expression determines which
             function key is being defined. The function key is not actually
             recognized until a ZBASIC-PC keyborad function is implemented,
             such as INPUT, LINE INPUT, and INKEY$ fucntion.
             When the GOTO is used, the line# specifies where the program will
             continue execution after the function key is hit. When RETURN is
             used, the function key is no longer implemented.
             All function keys are disabled until the INKEY$() statement is
             used.
     Remark: Remember to use the INKEY$(1) statment to enable function keys;
             otherwise, ZBASIC-PC doesn't check to see if the ON INKEY$()
             statement was used.
             When a GOTO is made from a function key, the current program
             execution is terminated and then restared at the location
             specified in the ON INKEY$() GOTO statement. Thus, this program
             cannot be nested in a subroutine. If a RETURN is executed before
             a GOSUB, the program will stop and ZBASIC-PC will return to the
             editor(or operating system).
      Table: Function Key Codes:
               KEY              ON INKEY$        INKEY$
               F1               1                59
               F2               2                60
               F3               3                61
               F4               4                62
               F5               5                63
               F6               6                64
               F7               7                65
               F8               8                66
               F9               9                67
               F10              10               68
               HOME             13               71
               Cursor Up        14               72
               Page Up          15               73
               Cursor Left      17               75
               Cursor Right     19               77
               END              21               79
               Cursor Down      22               80
               Page Down        23               81
               INSERT           24               82
               DELETE           25               83
OPEN -------------------------------------------------------------------------
     Format: OPEN"I",[#]filenumber, filename[, record length]
             OPEN"O",[#]filenumber, filename[, record length]
             OPEN"R",[#]filenumber, filename[, record length]
             OPEN"A",[#]filenumber, filename[, record length]
             OPEN"E",[#]filenumber, filename[, record length]
 Definition: The OPEN statement is used to access a data file. Once a file is
             opened, information may be read from or written to the file
             depending on the way the file was opened. The first argument
             determines access:
               R          - Read/Write file. Open file if it exists, create
                            the file if it doesn't.
               I          - Read only file. Open file for input. If file
                            doesn't exist, a disk error occurs.  ERROR > 0.
               O          - Write only file. Overwrites the old file if it
                            exists, if not it creates it. Remember to close
                            the file or your writes may not be there.
               A          - Opens a file at end for ASCII append if file
                            exists, if not it creates it. Backs up over any
                            EOF markers (CHR$(26)).
               E          - Opens a file at end for absolute append if file
                            exists, if not it creates it.
               filenumber - The number you assign to a file for reference with
                            READ, WRITE, INPUT, PRINT, LOC, LINE INPUT, and
                            EOF.
               filename   - The filename as it appears in a directory. Drive
                            and optionally pathname can be specified.
               record     - Optional record length to be used with that
               length       file(default is 256).
     Remark: To configure ZBASIC-PC to have more than two files open at a
             time, see configure in manual. DOS limits you to a max of 15.
OPEN "C" ---------------------------------------------------------------------
     Format: OPEN"C",[-port],[baud],[stopbit],[wordlength],[port],[IRQ],
                     [buffersize]
 Definition: This statement is used to set serial communications port
             parameters. If any of the parms are omitted, the defualt is used,
             but the commas should be included.
             -port    -1 Com1   -2 Com2   -3 Com3   -4 Com4 ... -8 Com8
             baud     110 150 300 600 1200(default) 2400 4800 9600 19200
                      38400 57600 115200. baud is an integer, thus 1 = 1115000.
             parity   0 = none(default)   1 = odd   2 = even
             stopbit  0 = one(default)    1 = two
             wordlength 0 = 7 bits  1 = 8 bits(default)
             status and control are not implemented but must be included.
             buffersize is used for loading incoming data with COM ON and
             COM OFF. COM ON is automatically executed when OPEN"C" is used.
             The buffer defaults to 256 bytes but may be configured up to
             65535 bytes. If buffer is set to 0 the buffer is flushed and
             the port operates in polling (immediate read/write) only.
     Remark: Serial ports may be accessed using the same statements used in
             disk I/O, PRINT#, INPUT#, LINE INPUT#, READ#, and WRITE#. In all
             of these statements, the port is not read or written to until the
             status indicates that the port is ready.
             The one exception to the paragraph above is when READ# is used to
             read a string of zero length. In this case, the character will be
             returned if ready, otherwise null string will be returned.
             A port does not have to be opened in order to be accessed. The
             OPEN "C" statement is used only to set the current port parameter
             values. Without this statement, the port will simply use the
             parameters to which it was last set. Presence of a 16550A chip is
             automatically recognized and buffer set. DTR remains up unless a
             CLOSE is issued. A port does not have to be opened, in this case
             the present settings are used. OPEN is used to alter settings
             and/or raise DTR if necessary.
OR ---------------------------------------------------------------------------
     Format: expression OR expression
 Definition: Performs a logical OR on the two expressions for IF THEN testing
             and BINARY operations. If either or both conditions are true,
             the statement is true.
             In binary/boolean operations, if either bit is one then a one is
             returned.
OUT --------------------------------------------------------------------------
     Format: OUT port, data
 Definition: The OUT statement sends data to the specified port number.
     Remark: See INP for a way of reading data in from the port.
PAGE -------------------------------------------------------------------------
     Format: PAGE
 Definition: Returns the current line position of the printer. The first line
             is 0.
     Remark: This function is simular to POS except the line position is
             returned instead of the character position.
             See CSRLN for getting the line position of the cursor.
     Format: PAGE [[expression1][,[expression2][,[expression3]]]]
 Definition: PAGE is used to format output to the printer and to control the
             number of actual lines per page, printed lines per page and top
             margin. Following is a description of the parameters:
             PAGE without parameters will send a page feed to the printer.
                  This forces the print head to move to the defined psosition
                  of the top of the next page.
             expression1  The number of lines per page.
             expression2  The number of actual lines per page. Also set the
                          line count to 0.
             expression3  Lines for the top margin. This number is a subset of
                          expression1. If the line count is 0, this many
                          linefeeds wil be output immediately.
     Remark: WIDTH LPRINT should be used to set the printer's character width
             for proper PAGE operation when doing LLIST.
PAGE LPRINT ------------------------------------------------------------------
     Format: PAGE LPRINT
 Definition: This statement dumps the screen to the printer.
PAINT ------------------------------------------------------------------------
     Format: PAINT(x,y)
 Definition: Fills a section of the screen with the current color. Same as
             FILL statement.
PALETTE ----------------------------------------------------------------------
     Format: PALETTE register#, color
 Definition: Changes the color in the palette. This statement will only work
             with PC's equipped with a color card in GRAPHICS MODES only.
PATH$ ------------------------------------------------------------------------
     Format: PATH$(drive number)
 Definition: Returns a string containing the current path of drive number.
             drive numbers:
              0 = default drive
              1 = drive A
              2 = drive B
              3 = drive C
              4 = drive E
                etc.
PEEK -------------------------------------------------------------------------
     Format: PEEK [word]( address[,segment])
 Definition: This statement is used to read a particular address in memory.
             The address is actually the offset into the segment given by
             segment. If the segment parameter is not given, the data segment
             used by ZBASIC-PC is used.
     Remark: By specifiying the segment, every address available can be
             accessed. The PEEK is done much faster, however, when the segement
             is not given.
PLOT -------------------------------------------------------------------------
     Format: PLOT expr1, expr2 [TO expr3, expr4...]
             PLOT [TO] expr1, expr2 [TO expr3, expr4...]
 Definition: The PLOT statement is used to draw either one graphic point, or
             a line between two or more points, in the current COLOR.
             Works in graphic modes only.
     Remark: As with all other ZBASIC-PC graphic commands, device independent
             graphic coordinates of 1024 by 768 are the default. Expressions
             are truncated to an integer. Character type graphics will be
             substituted on computers, or modes, without graphic capabilities.
PLOT USING -------------------------------------------------------------------
     Format: PLOT USING x,y,string[,magnification]
 Definition: This statement is used to plot a set of pixels on the screen in
             a pattern defined by string starting at location x,y. The
             starting location x,y defines a point on the screen according to
             the ZBASIC-PC graphic coordinate system. The simple string string
             tells ZBASIC-PC whrer to plot each point corresponding to the one
             before it. The following characters are accepted "UDLRHIJK",
             which control direction, and "+" or "-", which turn plotting on
             and off. The "=" resets to background color(which in effect
             erases any plot) anda number is a repeating factor. Letters
             specify direction as follows:
               H U I
               L   R
               K D J
     Remark: Each pixel is plotted in the color last set by the COLOR
             statement; thus a pattern can be erased by setting COLOR = 0
             and replotting.
             When turning the plotting back on with a "+" imbedded in the
             string, note that the pixel at that point is plotted. Non-valid
             letters/symbols are ignored and could bes used as control values
             for other purposes.
POINT ------------------------------------------------------------------------
     Format: POINT(expression1, expression2)
 Definition: Point is available on many computers to inquire about the color
             of a specific screen graphic position. As with other commands,
             ZBASIC-PC device independent graphic coordinates may overlap
             pixels.
     Remark: If the coordinate is outside the screen coordinates, a -1 will
             be returned.
POKE -------------------------------------------------------------------------
     Format: POKE [WORD] address, data[,segment]
 Definition: This statement is used to set a particular address in memory to
             a value determined by data.
             The address is actually the offset into the segment given by
             segment. If the segement parameter is not give, the ZBASIC-PC
             data segment is used.
POS --------------------------------------------------------------------------
     Format: POS(expression)
 Definition: Returns the current horizontal cursor position, from 0 to 255,
             for a screen, printer or disk file.
             The expression specifies a device as follows:
                0 = Default device, normally video.
                1 = Printer.
                2 = Disk file(DOS sequential-CR/LF delimited).
     Remark: A carriage return will set POS value to 0. PAGE will return the
             current line position for the printer.
PRINT ------------------------------------------------------------------------
     Format: PRINT[{@ or %}](expr1, expr2)[list]
 Definition: The PRINT statement is used to output information to the current
             device, normally the video.
             @ (expr1,expr2) specifies text coordinates.
             % (expr1,expr2) specifies graphic coordinates.
             expr1           horizontal
             expr2           vertical
     Remark: PRINT followed by a semicolon ";" will disable the carriage
             return.
             A PRINT item followed by a comma will cause the next element to
             be printed at the next TAB stop defined by DEF TAB.
             See ROUTE for ways of sending PRINT data to another device like a
             printer, disk file or serial port.
             See "SCREEN PRINTER" for other ways of formating text, especially
             differences in PRINT@ when DEF PAGE is used with non-standard
             screen widths and heights with EGA/VGA fonts and text in VGA
             graphics Modes 21 and 22.
PRINT# -----------------------------------------------------------------------
     Format: PRINT#expression, var, var,...
 Definition: Used to PRINT information to a disk file or other device in text
             format. Numbers or strings will appear in the file or device
             similar to how they would look on the screen or printer.
             The expression is the file number assigned to the disk file or
             other device in an OPEN statement.
             INPUT# or LINE INPUT# are normally used to read back data created
             with PRINT#(although READ# may also be used).
     Remark: Be sure to see the entry on INPUT for more information about
             using PRINT# and INPUT#.
PRINT USING ------------------------------------------------------------------
     Format: PRINT[#filenumber,]USING formatstring;numeric expression;USING...
 Definition: This function permits formating numeric data in PRINT or PRINT#
             statements.
             The last numeric digit displayed will be rounded up by adding 5
             to the first digit on the right that is not displayed.
             The formatstring may be a quoted or variable using the following
             symbols:
             #  Hold place for a digit. More than one may be used.
             ,  Insert a comma in that place.
             .  Determines placement of decimal point.
             $  Prints a dollar sign on the left of the format.
             +  Prints a floating plus or minus sign on the left of the
                number.
             -  Prints a floating minus sign on the left of the number, only
                if the number is negative.
             *  Fills spaces before a number with asterisks.
     Remark: When error is printed in the format field,, this indicates an
             occurance of an overflow condition and replaces the nuber that
             would have been printed. An overflow condition is when the value
             of the expression would have exceeded the boundries of the format.
PSTR$ ------------------------------------------------------------------------
     Format: PSTR$(var%)
             READ PSTR$(var%)
             PSTR$(var%) = "quoted string constant"
 Definition: Returns the pointed to by var%.
             Loads the address of a string constant into var%.
PUT --------------------------------------------------------------------------
     Format: PUT(x1,y1) variable[(array index)[,array index[,...])[,mode]
 Definition: This statement places the graphic bit image stored in an array
             with the GET statement to the screen position at coordinates
             specified by x1,y1.
             If an array has been used then you MUST specifiy the index
             number of the array.
             Memory required for pixel images is calculated using this formula:
             6+((y2-y1)+1*((x2-x1+1)*bbp+7)/8
             The number of bits per pixel(bbp) depends on system colors or
             grey levels.
             MODE   XOR    XORs the pixels over the background pixels.
                     OR    ORs the pixels over the existing pixels.
                    AND    ANDs the picture with the background.
                    PRESET Similar to PSET except the reverse image is shown.
                    PSET   Draws image over background exactly as created.
             It is recommended that COORDINATE WINDOW be used when using GET.
             Bits-Per-Pixel(bbp) chart
             GRAPHIC TYPE      MODE(s)  COLORS  BITS PER PIXEL
             CGA               5        4       2
             CGA               7        2       1
             EGA               16-19    3-16    2
             EGA               16-19    16      4
             Hercules          20       1       1
             VGA               21       2       1
             VGA               22       16      4
             MCGA              23       256     8
RANDOM -----------------------------------------------------------------------
     Format: RANDOM[expression]
 Definition: Seeds the random number generator.
             If expression is used, the RND function will reutrn a repeatable
             serise of numbers.
RATIO ------------------------------------------------------------------------
     Format: byteexpression1,byteexpression2
 Definition: This statement will change the aspect ratio of graphics created
             with CIRCLE.
             byteexpression1  Horizontal ratio. A number between -128 and +127
                              that gives the relationship of the width of the
                              circle to normal(zero).
             byteexpression2  Vertial ration. A number between -128 and +127
                              that gives the relationship of the height of the
                              circle to normal(zero).
             VALUE     RELATIONSHIP TO NORMAL
             +127      = 2.0   times normal
              +64      = 1.5   times normal
              +32      = 1.25  times normal
                0      = 0     normal proportion
              -32      = 0.75  times normal
              -64      = 0.5   times normal
              -96      = 0.25  times normal
             -128      = 0     times normal(no width or height)
     Remark: RATIO settings are executed immediately and all CIRCLE commands,
             including CIRCLE TO and CIRCLE PLOT will be adjusted to the last
             RATIO.
READ -------------------------------------------------------------------------
     Format: READ [variable{-or-PSTR$(var%)}[...]]
 Definition: The READ statement reads strings or numbers from a DATA statement
             into corresponding variables.
             The variable list can consist of any combination of variable types
             (string or numeric, including arrays).
             If no variable is given, the READ statement will skip one DATA
             item.
     Remark: Leading spaces in string data statements will be ignored unless
             contained in quotes.
             Do not read numeric data into string variables and vice versa
             (no error is generated). Don't read past the end of a data list.
READ# ------------------------------------------------------------------------
     Format: READ#filenumber,[var[var$;stringlength][,,...]
 Definition: Reads strings or numbers saved in compressed format with WRITE#
             and stores them into corresponding variables. The list may
             consist of any type string or numberic variables or array
             variables.
             filenumber    The filenumber to work from
             var           Any numeric type variable
             var$          String variable
             ;stringlength The number of characters to load into the string
                           variable
             IMPORTANT NOTE: A string variable must be followed by
                             ;stringlength to specify the number of characters
                             to be read into that string.
     Remark: Note: Do not mix variable types when using READ# and WRITE#.
             Reading string data into numberic variables, and vice-versa will
             create variables with incoherent data.
             READ# and WRITE# store and retrieve numeric data in a compressed
             format.
READ#128/129 -----------------------------------------------------------------
     Format: READ# 128/129(LPT1:/LPT2:)
 Definition: Reports status of LPT1: and LPT2:. It is not necessary to OPEN#128
             or #129, however a "FILE NOT OPEN ERROR" is returend if hardware
             is not present.
             Status can either be read as READ#128,A$;1 or READ#1,A. The bit
             values are as follows:
             Bit 7   Printer NOT ready
             Bit 6   Acknowledged
             Bit 5   Out of Paper
             Bit 4   Selected
             Bit 3   I/O error
             Bit 2   Unused
             Bit 1   Unused
             Bit 0   Unused
    Example: READ#128,X$
             X = ASC(X$)
             IF X = 223 PRINT "Printer Ready"
             IF X = 103 PRINT "Paper Out"
             IF X = 71  PRINT "Printer Off Line"
RECORD -----------------------------------------------------------------------
     Format: RECORD[#]filenumber,recordnumber[,location in record]
 Definition: The RECORD statement is used to position the file pointer
             anywhere in a file. Once the file pointer has been positioned you
             may read or write data from that position.
             RECORD can position both the RECORD pointer and location within
             a record.
             filenumber         Filenumber from 1 to 99
             recordnumber       RECORD number to point to. Defualt is 0.
             location in record Optional location in RECORD. Default is 0.
     Remark: The default RECORD length is 256 bytes. The maximum record length
             65535. The maximum number of records in a file is 65,535.
             The location within a record is optional(0 is assumed if not
             given).
             If RECORD is not used, reading or writing starts from the current
             pointer position. If a file has just been opened, the pointer is
             positioned at the beginning.
             After each read or write, the pointer is moved to the next
             position in the file.
REC --------------------------------------------------------------------------
     Format: REC(filenumber)
 Definition: Returns the current position of the record pointer for the file
             specified by filenumber. The first record in a file is record 0.
             Also often used with REC is LOC which returns the position within
             a record.
     Remark: The default record length is 256 bytes.
REM --------------------------------------------------------------------------
     Format: REM followed by program remarks
 Definition: The REM statement is used for inserting comments or remarks into
             a program. ZBASIC-PC ignores everything following a REM statement
             to the end of the line.
             The apostrophe ' may be used at the beginning of a line.
     Remark: REM statements are not compiled and do not take up any memory in
             the object code.
RENAME -----------------------------------------------------------------------
     Format: RENAME string1 TO string2
 Definition: This statement is used to rename the file string1 to string2.
       Note: Path names can be specified in RENAME as a way of moving files
             from one subdirectory to another.
RESET ------------------------------------------------------------------------
     Format: RESET
 Definition: Closes all open files and devices. Functionally identical without
             parameters.
RESTORE ----------------------------------------------------------------------
     Format: RESTORE [expression]
 Definition: This statement resets the DATA pointer to the first DATA
             statement or optionally to the DATA item specified by expression.
             If expression is omitted, the first DATA item is assumed.
             ZBASIC-PC automatically set the pointer to the next item after
             each variable is READ.
     Remark: If an attempt is made to READ or RESTORE past the last DATA item,
             the result will be zeros or null strings. No error will be
             returned.
RETURN -----------------------------------------------------------------------
     Format: RETURN [line]
 Definition: The RETURN statement is used to continue execution at the
             statement immediately following the last executed GOSUB or
             ON GOSUB statement.
             If optional line is used, the last GOSUB is POPPED off the stack
             and a GOTO line is performed.
     Remark: When ZBASIC-PC encounters a RETURN statement which was not called
             by a GOSUB, it will return to the program that executed it
             (either DOS or the editor).
             Using RETURN line WITHOUT A GOSUB or from the middle of a LONG FN
             will cause unpredictable system errors.
RIGHT$ -----------------------------------------------------------------------
     Format: RIGHT$(string,expression)
 Definition: Returns the right-most expression characters fo string.
     Remark: If expression is more than the characters available, all
             characters will be returned.
RMDIR ------------------------------------------------------------------------
     Format: RMDIR pathname
 Definition: Removes a directory. Only empty directories may be removed.
     Remark: If an error is encountered when using CHDIR, RMDIR or MKDIR
             ZBASIC-PC sets ERROR to 11.
RMD --------------------------------------------------------------------------
     Format: RND(expression)
 Definition: The RND function returns a random integer number from 1 to
             expression.
     Remark: The largest number you may use for a RND expression is 32,767.
ROUTE ------------------------------------------------------------------------
     Format: ROUTE[#] expression
 Definition: This statement is used to route PRINT or INPUT statements to a
             specified device. The following are values to be used as
             expression:
             -1 to -8       Serial ports 1 - 8
             0              Screen(default)
             1-99           Disk files specified by number
             128,129,130    Printer (LPT1, LPT2, LPT3)
             234            Writes through DOS (for ANSI.SYS or file
                            Redirection
     Remark: Always re-route output back to the screen.
SCREEN -----------------------------------------------------------------------
     Format: SCREEN(row, column[,color])
 Definition: If color is 0 or not used, this function returns the ASCII code
             for the character at row/column when in text mode.
             If color is used and is not 0, the color of the text character at
             row/column is returned.
             row     expression from 0-24
             column  expression from 0-39 or 0-79 depending on current mode.
             The upper left corner is defined the same way as the LOCATE
             function.
             The number returned when using the color parameter may be
             converted into foreground/background numbers using this formula:
               foreground = (number MOD 16)
               background = (((number-foreground)/16)MOD128)
SCREEN(MODE) -----------------------------------------------------------------
     Format: SCREEN modenumber
 Definition: Allows changing from one graphic type to another. Similar to
             ZBASIC-PC MODE statement.
             ZBASIC-PC MODE       SCREEN MODE
                   2                 0
                   5                 1
                   7                 2
                  16                 7
                  17                 8
                  18                10
                  19                 9
                  21                11
                  22                12
                  23                13
SELECT -----------------------------------------------------------------------
     Format: SELECT [expression or simplestring]
               CASE [IS] relational condition[, relational condition][,...]
                 statements...
               CASE [IS] condition [,condition][,,...]
                 statements...
               CASE [IS] boolean expression
                 statements...
               CASE ELSE
             END SELECT
 Definition: Provides a structured way of doing multiple comparisons with a
             single expression.
     Remark: Always exit a SELECT at END SELECT.
SGN --------------------------------------------------------------------------
     Format: SGN(expression)
 Definition: Returns the sign of expression.
SHELL ------------------------------------------------------------------------
     Format: SHELL string
 Definition: The SHELL statement followed by simple string will load and
             execute another program specified by string. If a null string is
             specified, the DOS will be loaded and excuted, typing EXIT will
             return to execute to ZBASIC-PC.
             This is identical to CALL string.
             STRING must be either a variable or a quoted string.
     Remark: There must be at least 17k of memory free to use SHELL.
             If COMMAND.COM is not found, the message "File not found" will be
             echoed to the display and control returned to the program.
SIN --------------------------------------------------------------------------
     Format: SIN(expression)
 Definition: The SIN function returns the sine fo the expression in radians.
     Remark: SIN is a scientific function. The precision for scientific
             functions are specified in configure.
             ZBASIC-PC provides a predefined USR function to do high-speed
             integer sines(up to 30 times the speed).
             USR(angle) returns the integer of sine of angle in the range +255
             (corresponding to 1). The angle must be in brads.
SOUND ------------------------------------------------------------------------
     Format: SOUND Frequency, duration
 Definition: SOUND may be used to create sound effects or music.
             Frequency     120Hz to 10KHz
             duration      1 millisecond increments.
SPACE$ -----------------------------------------------------------------------
     Format: SPACE$(expression)
 Definition: Returns a string of spaces expression characters long(0-255).
SPC --------------------------------------------------------------------------
     Format: SPC(expression)
 Definition: SPC prints expression spaces from 0 to 256.
             Prints the number of spaces specified by expression.
SQR --------------------------------------------------------------------------
     Format: SQR(expression)
 Definition: The SQR function returns the square root of expression.
     Remark: SQR is a scientific funtion whose precision is set in configure.
SETP -------------------------------------------------------------------------
     Format: FOR var = expr1 to expr2 [STEP expr3]
               .
             NEXT [var][,var]
 Definition: This parameter allows sets the increments used in a FOR-NEXT
             loop. If STEP is omitted then 1 is assumed.
     Remark: If STEP = 0 then an endless loop is executed.
             If expr1 or expr3 change while the loop is executed this change
             will be in effect when NEXT is encountered.
STOP -------------------------------------------------------------------------
     Format: STOP
 DEfinition: STOP halts execution of ZBASIC-PC and prints the line number
             where execution stopped if line numbers are used or a relative
             number if line numbers are not used.
     Remark: STOP closes all files.
             Use END when no number is desired.
STR$ -------------------------------------------------------------------------
     Format: STR$(expression)
 Definition: STR$ returns the string exquivalent of expression(a number). This
             is used to convert numbers or numeric variables to a string.
             This function is the compliment of VAL which converts a string
             into a number.
STRING$ ----------------------------------------------------------------------
     Fromat: STRING$(expr1,string)
             STRING$(expr1,expr2)
 Definition: Returns a string of the length expr1 consisting of the characters
             specified by either the ASCII exquivalent of expr2 or the first
             character of string.
SYSTEM -----------------------------------------------------------------------
     Format: SYSTEM
 Definition: Same as END.
SWAP -------------------------------------------------------------------------
     Format: SWAP var1, var2
 Definition: SWAP exchanges the contents of var1 and var2. Variables cannot be
             INDEX$ type.
             var1 and var2 must be of the same type.
TAB --------------------------------------------------------------------------
     Format: TAB(expression)
 Definition: Tab will move the cursor to positions 0 through 255 designated by
             expression.
             Three devices may be used with TAB and are: SCREEN, PRINTER and
             DISK.
TAN --------------------------------------------------------------------------
     Format: TAN(expression)
 Definition: Returns the value of the tangent of the expression in radians.
     Remark: TAN is a scientific function whose accuracy may be configured.
TFORMAT ----------------------------------------------------------------------
     Format: TFORMAT[=]expression
 Definition: The TFORMAT statement is used to set the text format when using a
             Hercules graphics MODE 20.
             The values for expression are:
               0    Reverse video
               1    Normal(PSET);Overlays graphics
               2    XOR mode. XOR text over background.
THEN -------------------------------------------------------------------------
     Format: if-THEN-else line or label
             if-THEN-else statement(s)
 Definition: THEN is used with an IF statement to route control on a true
             condition.
             THEN may refer to a linenumber or a label or it may be followed
             by one or more statements that will be executed if the condition
             is true.
     Remark: All statements on a line following a THEN are conditional on that
             THEN.
TIME$ ------------------------------------------------------------------------
     Format: TIME$
             TIME# = [hour][[minute][,second]]
 Definition: Returns an eight character string which represents the sytem
             clock value in the format HH:MM:SS in 2400 hour format.
             The second form is used to set the system time. Any of the three
             parameters may be omitted in which case the parameter is not
             changed.
TIMER ------------------------------------------------------------------------
     Format: TIMER
 Definition: Returns the number of seconds elapsed since midnight.
     Remark: Since the number of seconds elapsed since midnight can be
             greater than 65,535 the holding varaible should not be an
             integer.
TROFF ------------------------------------------------------------------------
     Format: TROFF
 Definition: TROFF is used to turn off trace statements: TRON, TRON X, TRON B
             and TRON S.
TRON -------------------------------------------------------------------------
     Format: TRON [{B S X}]
 Definition: This statement is used for tracing program execution, single
             stepping through a program, and setting break points for
             monitoring the BREAK key so that you can break out of program.
             TRON   Prints the line numbers of hte program as each line is
                    executed.
             TRON S Lets you single step through a program. Program execution
                    will pause at the beginning of every line in the program
                    following the TRON S. Press any key to continue or press
                    CNTRL Z to enable/disable single stepping.
             TRON X Sets a break point at that line in a program and checks to
                    see if the BREAK key has been pressed.
             TRON B Sets a break point at that the beginning of every line in
                    the program.
             CTRL S will pause execution when encountered during execution of
             TRON B, TRON X, or TRON. Any key will restart.
             CTRL Z will toggle single stepping when any TRON is active.
             Note that INKEY$ may loose keys if TRON is used.
     Remark: Every line between TRON and TROFF may use up to 8 extra bytes per
             line. Use TRON sparingly to save memory and increase execution
             speed.
UCASE$ -----------------------------------------------------------------------
     Format: UCASE$(string)
 Definition: Returns a string with all characters converted to upper case.
UNS$ -------------------------------------------------------------------------
     Format: UNS$(expression)
 Definition: Returns a string which equals the integer value of expression in
             an unsigned decimal format.
     Remark: This function is useful for displaying integers in an unsigned
             format(0 through 65,535 instead of -32,768 through 32,768).
UNTIL ------------------------------------------------------------------------
     Format: DO
               .
             UNTIL expression
 Definition: UNTIL is used to mark the end of a DO loop.
             The DO loop repeats until the expression following UNTIL is
             true(non-zero).
             A DO loop will always execute at least once.
    Example: DO
               X = X + 1
             UNTIL X = 100
USR --------------------------------------------------------------------------
     Format: USRdigit(word expression)
 Definition: The USR function calls the user created routine, defined with
             DEFUSR, specified by digit(0-9), and returns the value of integer
             expression in the 16 bit accumulator.
     Remark: A machine language return is necessary at the end of USR routine.
             MACHLG  &8B,&C4,&C3
USR0 -------------------------------------------------------------------------
     Format: USR0(VESA graphics MODE number)
 Definition: Advanced "CARDTYPE" feature. Allows for inquiry of video card &
             monitor capabilities. Returns 2 if capable, 1 if card is capable
             but monitor isn't, 0 if card isn't capable of inquired MODE.
USR1 -------------------------------------------------------------------------
     Format: USR1(filenumber)
 Definition: This is equivalent to EOF(filenumber). The result is -1 if end
             of file, 0 if not.
             Use EOF instead.
USR2 -------------------------------------------------------------------------
     This function is no longer used as time adjustment settings are now done
     automatically by the compiler. It is left in (but no longer functions)
     for compatibility with previous versions.

USR3 -------------------------------------------------------------------------
     Format: USR3(expression)
 Definition: This function is used to control the keyboard input and status as
             follows:
             USR3(0)    Returns the next character struck from the keyboard.
                        The ASCII code is returned in the lower 8 bits. The
                        keyboard scan code is returned in the upper 8 bits.
             USR3(1)    Scans the keyboard buffer. 0 is returned if no key
                        was pressed. If there is a key in the buffer, the
                        ASCII and scan codes are returned same as USR3(0),
                        except the character will remain in the buffer.
             USR3(2)    Returns the current shift status. The bits returned
                        are as follows:
                        *Bit7 = Insert Key active
                        *Bit6 = Caps lock key toggle
                        *Bit5 = Num lock key toggle
                        *Bit4 = Scroll lock key toggle
                         Bit3 = Alternate key depressed
                         Bit2 = Control key depressed
                         Bit1 = Left Shift Key depressed
                         Bit0 = Right Shift key depressed
     Remark: Remember that USR3(1) does not take the character out of the
             buffer. This can be useful for checking the keyboard for a
             specific key before going into a standard input routine.
USR4 -------------------------------------------------------------------------
     Format: USR4(address)
 Definition: USR4 is used to set the ctrl-break address (or ctrl-C) when one
             is detected. The address specified must be in ZBASIC-PC's code
             segement.
    Example: USR4(Line 2000)
             This sets the ctrl-break address to be ZBASIC-PC's line 2000. In
             this case, if during program execution a ctrl-break is detected,
             a jump will be made to line 2000.
     Remark: When USR4 is used, program execution may not be resumed as the
             stack is not preserved. Note that ZBASIC-PC ignores the ctrl-C
             and ctrl-break keys unless this routine is used.
USR5 -------------------------------------------------------------------------
     Format: USR5(port)
 Definition: USR5 is used to return the status of the communication port.
             -1 = COM1
             -2 = COM2
             -3 = COM3
             -4 = COM4
             The status bits returned are defined as follows:
              Bit15 = Time out
              Bit14 = Trans shift register empty
              Bit13 = Tran Holding register empty
              Bit12 = Break detect
              Bit11 = Framing error
              Bit10 = Parity error
              Bit9  = Overrun error
              Bit8  = Data ready
              Bit7  = Received line signal detect
              Bit6  = Ring indicator
              Bit5  = Data set ready
              Bit4  = Clear to send
              Bit3  = Delta recieve line signal detect
              Bit2  = Trailing edige ring detector
              Bit1  = Delta data set ready
              Bit0  = Delta clear to send
     Example: J=USR5(-1)
              This gets the status of communications port 1(COM1).
      Remark: This function can be useful in investigating the RS-232 Control.
              If there is a problem with the 232 communication(such as
              mismatched baud rate, parity error, time out, or cable hookup),
              it can be evident by observing the status via the USR5 function.
USR6 -------------------------------------------------------------------------
     Format: USR6(expression)
 Definition: Returns the last line number executed that used any of the TRON
             functions. expression is a dummy value.
    Example: TRONX
             I = USR6(0)
             PRINT I
USR7 -------------------------------------------------------------------------
     Format: USR7(expression)
 Definition: Returns ZBASIC-PC's random number seed used in the RND function.
             expression is a dummy value.
USR8 -------------------------------------------------------------------------
     Format: USR8(angle)
 Definition: Returns the integer sine of angle in the range = 255
             corresponding to  = 1). The angle must be in brads.
USR9 -------------------------------------------------------------------------
     Format: USR9(angle)
 Definition: Returns the integer cosine of angle in the range = 255
             (corresponding to = 1). Then angle must be in brads.
VAL --------------------------------------------------------------------------
     Format: VAL(string)
 Definition: Returns the numeric value of the first number in a string.
             The VAL function will terminate conversion at the first
             non-numeric character in string.
             This function is the compliment of STR$. STR$ will convert a
             numeric expression to a string.
     Remark: The numeric value returned by VAL will be in floating point
             format.
VARPTR VARSEG ----------------------------------------------------------------
     Format: VARPTR(variable)
             VARSEG
 Definition: This pair of functions is used to determine the memory address of
             a variable. VARPTR(variable) returns the offset of the variable.
             VARSEG returns the segement of variable.
    Example: A = VARPTR(A$)
             B = VARSEG
     Remark: Because of the enhanced variable memory capability, the VARPTR
             function is slightly different from previous versions.
             Integers, BCD's, strings and BCD/string arrays are given their
             own dedicated block of memory so that more data can be stored.
             Therefore, two numbers are needed; one for the offset; one for
             the segment.
             The VARSEG function returns the segment of the last variable used
             with VARPTR. Its value is valid only immediately after a VARPTR
             has been executed.
VIEW PRINT -------------------------------------------------------------------
     Format: VIEW PRINT topline TO bottomline
 Definition: Used to set scrolling boundries.
             topline     The top line to be used for output.
             bottomline  The bottom line to used for output.
             This statement is very simular to the ZBASIC-PC DEF PAGE
             statement which also allows setting the column boundries as well.
WAIT -------------------------------------------------------------------------
     Format: WAIT portnumber, AND expression [, XOR expression]
 Definition: Suspends program execution while checking the status of an input
             port.
             portnumber        numeric from 0-65535
             AND expression    integer from 0-255
             XOR expression    integer from 0-255
    Example: WAIT PORT(x), 255,255
     Remark: The WAIT statement causes execution of the program to be
             suspended until a specified prot produces a certain bit pattern.
             The data read at the port is XORed with the XOR expression and
             ANDed with the AND expression. If the result is 0 the program
             loops back to read the port again.
    CAUTION: The computer may lock up if the requried bit pattern does not
             appear on the port.
WEND -------------------------------------------------------------------------
     Format: WHILE expression
               .
             WEND
 Definition: This statement is used to terminate a WHILE loop. When expression
             becomes false the loop will exit at the first statement
             following the WEND.
     Remark: A structure error will occur if a WHILE exists without a matching
             WEND.
WHILE ------------------------------------------------------------------------
     Format: WHILE expression
 Definition: In a WHILE statment, expression is tested for true before the
             loop is executed and will exit to the statement immediately
             following the matching WEND when expression becomes false.
     Remark: A structure error will occur if a WHILE exists without a WEND.
WIDTH ------------------------------------------------------------------------
     Format: WIDTH [LPINT] [=] byte expression
 Definition: Sets the allowable number of characters on a line before
             generating an automatic line feed.
             The optional LPRINT designates printer width.
             If byte expression is set to 0. ZBASIC-PC will not send an
             automatic CR/LF. The rang of byte expression is 0 to 255.
     Remark: The default setting fo the screen width is 0 which disables the
             auto LF/CR after the limit has been reached.
             To return WIDTH to normal, type WIDTH 79 (for 80 column screens)
             or WIDTH 0. When widths are set, listings are wrapped around
             nicely for easy reading.
             To effect a smaller width, set byte expression to the width
             desired. To assure valid results for the POS statement and to
             keep line position count used by tabs correct, be sure WIDTH is
             set to the actual screen width minus 1.
WRITE# -----------------------------------------------------------------------
     Format: WRITE#expression1, [var1%][var!][var#][var$;stringlength][,...]
 Definition: Writes the contents of string or numeric variables in compressed
             format to a disk file(or other device) specified by expr1. The
             list may consist of any variable type or types, string or numeric
             including arrays, in any order. Constants may NOT be used!
             A string variable MUST be followed by ;stringlength which
             specifies the number of characters of that string to be written.
             If the string is shorter than stringlength, the extra characters
             will be spaces.
             If the string is longer than stringlength, the extra characters
             will be truncated.
             READ# is the statement normally used to read back data written
             with WRITE# and will automatically read back the data written in
             compressed format.
     Remark: Do NOT mix variables types when using READ# and WRITE#. READ#
             and WRTIE# store and retrieve numeric data in compressed format.
             This saves disk space and speed program execution.
    Example: WRITE#1, A$;4, B
WRITE#128/129 ----------------------------------------------------------------
     Format: WRITE# expression
 Definition: This is a special "direct write to printer port" function which
             by-passes both DOS and BIOS, therefore it may not work with some
             quasi-copmatiable hardware. It is intended primarily for speeding
             up(as much as 200%) high quality printer output such as complex
             laser printer output or bit graphics with dot matrix printers.
             Low volume output, such as text pages,may show little speed
             advantage with this method. It is suggested that READ#128/129
             (read ports status) be used with WRITE# 128/129 for error
             handling routines. WRITE#128/129 will not time-out if the printer
             is not connected, however Control C can be used to break out of
             various printer error conditions.
             128 is LPT1
             129 is LPT2
       Note: The variables written with WRITE#128/129 must be of specific
             length, and is a line-feed/cariage return is to be issued a
             CHR$(10) and CHR$(13) should be added to the STRING written.
XELSE ------------------------------------------------------------------------
     Format: LONGIF expression
              .
             XELSE
              .
             ENDIF
 Definition: This statement is used to separate the FALSE from the TRUE
             section of a LONGIF structure.
             The statements following the XELSE will only be executed if the
             statement following the LONGIF is false.
     Remark: A structure error will occur if the XLESE does not have a
             matching LONGIF.
XOR --------------------------------------------------------------------------
     Format: expression1 XOR expression2
 Definition: Provides a means of doing a logical EXLUSIVE OR on two
             expressions for IF-THEN testing and BINARY operations.
             This operator will return true if one condition is true and
             one condition is false. False will be returned if both conditions
             are true or false.
ANSI Codes -------------------------------------------------------------------
ESC[#;#H      - Cursor Position at row;column - if no positions, cursor
                is put at (1,1)
ESC[#;#f      - Horizontal & Vertical Position cursor at row;column
ESC[#A        - Cursor Up # of rows.
ESC[#B        - Cursor Down # of rows.
ESC[#C        - Cursor Forward # columns.
ESC[#D        - Cursor Backward # of columns.
ESC[#n        - Device Status Report - # must be 6.
ESC[#;#R      - Cursor Position Report Row;Column
ESC[s         - Save Cursor Position
ESC[u         - Restore Cursor Position
ESC[#J        - Erase Display - # must be 2.
ESC[K         - Erase to end of line.
ESC[#L        - Insert # lines (not supported in ANSI.SYS)
ESC[#@        - Insert characters (not supported in ANSI.SYS)
ESC[#P        - Delete characters (not supported in ANSI.SYS)
ESC["string"m - Keyboard Key Reassignment - must have key code first
                F1 0;59  F3 0;61  F5 0;63  F7 0;65  F9 0;67
                F2 0;60  F4 0;62  F6 0;64  F8 0;66  F10 0;68
ESC[#;#;...#m - Set graphic Rendition (color controls etc.)
                0 = Turn attributes off color is black and white
                1 = Bold
                4 = Underline(non CGA)
                5 = Blink
                7 = Reverse
                30-37 Foreground black/red/green/yellow/blue/magenta/cyan/white
                40-47 Background black/red/green/yellow/blue/magenta/cyan/white
ESC=nh        - Set Video Mode
               Mode Code           Value
                   0               text 40x25 Black & White
                   1               text 40x25 Color
                   2               text 80x25 Black & White
                   3               text 80x25 Color
                   4               bitmap 320x200 4 bits/pixel
                   5               bitmap 320x200 1 bit/pixel
                   6               bitmap 640x200 1 bit/pixel
                   13              bitmap 320x200 4 bits/pixel
                   14              bitmap 640x200 4 bits/pixel
                   15              bitmap 640x350 1 bit/pixel
                   16              bitmap 640x350 4 bits/pixel
                   17              bitmap 640x480 1 bit/pixel
                   18              bitmap 640x480 4 bits/pixel
                   19              bitmap 320x200 8 bits/pixel


                    Modes 0, 1, and 4-19 require a CGA, EGA or VGA.
                    Modes 13-16 require an EGA or VGA.
                    Modes 17-19 require a VGA.
                    Other graphics cards may support other video modes.
ESC[?nh       - Set non-video mode - value is 7.
ESC[?n1       - Reset non-video mode - value is 7.
