home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / shwtxt19.zip / SHOWTEXT.DOC < prev    next >
Text File  |  1995-09-12  |  125KB  |  2,300 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.               ┌────────────────────────────────────────────┐
  18.               │                                            │
  19.               │    S    H    O    W    T    E    X    T    │
  20.               │                                            │
  21.               └────────────────────────────────────────────┘
  22.                                VERSION 1.9
  23.  
  24.                      PROGRAMMING  LANGUAGE  MANUAL
  25.  
  26.  
  27.                (c) Garry Spencer / Spencer Technologies
  28.                P. O. Box 34OO9 - Memphis, TN - 38184-OOO9
  29.  
  30. The ShowText system consists of a number of files, which are listed in the
  31. text file PACKING.LST.
  32.  
  33. The function of these files is determined by their extension.
  34.  
  35. .ST   These files are ASCII text files which are edited by YOUR OWN
  36.       text-editor/word-processor and contain the command program that
  37.       will control program execution.  The syntax of each command in the
  38.       ShowText programming language is explained later in this document.
  39.       Your text-editor/word-processor MUST be capable of storing text
  40.       in plain ASCII format.
  41.  
  42. .STF  These files are the (Show Text File) drawing files which may be displayed
  43.       on the screen during program execution.  A single .ST file can hold up to
  44.       2048 (.STF) drawing files.
  45.  
  46. .EXE  These files are the finished executable files.  They are
  47.       generated by compiling the .ST file with any .STF file(s) which
  48.       the .ST file references.  All of this information is stored in the
  49.       .EXE file.  These files may be "run" by using the R command from within
  50.       the ST program or by issuing the appropriate DOS command.
  51.       Please note that any changes to the .ST command file or to any of the
  52.       .STF files that it references will require that the program be 
  53.       recompiled using the C command from within ST or by issuing the
  54.       DOS command (STC filename).
  55.  
  56.       Special Note about compiled .EXE files:
  57.       The .EXE files generated by the ShowText compiler (STC.EXE) have a
  58.       special overlay structure containing configuration data, library files
  59.       etc.  DO NOT attempt to compress these .EXE files with LZEXE, PKLITE,
  60.       DIET or any other .EXE file compressors.  You should also be sure that
  61.       you run the finished .EXE programs on systems having at least 512k bytes
  62.       free because provisions have been made to allow each of these programs
  63.       to store up to 63 text screens IN MEMORY!  It would probably not be
  64.       possible to run these programs from a SHELL-to-DOS.
  65.  
  66. The ShareWare files must be distributed together.  Under NO circumstances, are
  67. the REGISTERED version files to be distributed.
  68.  
  69. Attention Disk Vendors and BBS Sysops !
  70. To determine if this version of ShowText is the ShareWare or REGISTERED
  71. version, type STC at the DOS prompt.  The program (STC.EXE) will display a
  72. message which will show the version type.  If you distribute the ShareWare
  73. version in archived form (e.g. ZIPped), use the filename SHWTXT19.ZIP where
  74. (19) indicates version (1.9) .
  75.  
  76.  
  77.                          GENERAL INFORMATION
  78.  
  79.  
  80. The ShowText system is designed to allow you to build demonstration 
  81. programs, tutorial/help systems, games, batch file menus, product catalogs
  82. etc. using user-designed color text (ASCII) screens.  The finished .EXE files
  83. feature integrated mouse support.
  84.  
  85. Please note that the ShowText system is a programming language.  It is highly
  86. recommended that you have some programming experience (in any language) before
  87. attempting to use the ShowText language.
  88.  
  89. In the ShowText system, there are several stand-alone programs such as
  90. STD.EXE, STC.EXE.  These programs may be run from the DOS command
  91. line by specifying the appropriate file as an argument on the command line.
  92.  
  93. For example,
  94.  
  95. STD filename     will expect an .STF drawing file as the filename
  96. STC filename     will expect an .ST  command file as the filename
  97.  
  98. To simplify the operation of the system, there is a menu program (ST.EXE)
  99. which will allow you to control drawing, editing, compiling and running the
  100. program files.
  101.  
  102. To get started, type the command:
  103. ST filename      where filename is the project name (up to 8 characters).
  104.                  The project name is used for the .ST and .EXE files.
  105.  
  106. The next few pages will briefly describe the operation of the programs included 
  107. in the ShowText system (i.e. ST.EXE, STD.EXE, STC.EXE ).
  108.  
  109.        RUNNING THE MENU PROGRAM (ST.EXE)
  110.  
  111. When the ST program is executed for the first time on your system it will
  112. look for its configuration file named ST.CFG.  This file stores the
  113. command string which is used to invoke YOUR word-processor/text-editor.  If this
  114. file is not found, it will prompt you to enter the command string.  This is only
  115. done once.  If the ShowText files are not in the current directory, then the
  116. directory which contains them must be in the system PATH variable.
  117.  
  118. If the command line used to invoke ST did not contain a filename (project
  119. name), then you will be prompted to enter the project name.  This name is used
  120. as a default for the (.ST) and (.EXE) filenames.  Note that ST, STC, STD
  121. and STM are reserved names and should not be used as project names.
  122.  
  123. The following options (keystrokes) are available in ST (ShowText):
  124.  
  125. A - toggles the automatic mode. When AUTO is ON, the EDIT/COMPILE/RUN sequence
  126.     is performed automatically (if there are no compile-time errors).
  127.  
  128. C - compiles the .ST command file and any .STF file(s) that it references
  129.     into a finished executable (.EXE) file.
  130.  
  131. D - invokes the drawing program which will enable you to draw the color ASCII
  132.     text screens (.STF files) for use in your application program.
  133.  
  134. E - invokes YOUR word-processor/text-editor by executing a temporary batch file.
  135.     There was no need to develop a dedicated text-editor for ShowText since most
  136.     users already have a favorite text-editor/word-processor.  Please note that
  137.     your word-processor/text-editor MUST be capable of storing files in plain
  138.     ASCII text format.
  139.  
  140. P - allows you to change the project name which is used to name the .ST 
  141.     command files and the .EXE executable files.  The names (ST, STC and
  142.     STD) are reserved filenames.
  143.  
  144. R - runs the .EXE executable application program. Note that pressing CTRL and
  145.     SHIFT at the same time, while your application is running, will allow you to
  146.     adjust the mouse sensitivity.
  147.  
  148. X (or Esc) will terminate the ST program.
  149.  
  150. Windows users will need to select the DOS prompt, then type ST filename
  151. (in the appropriate directory).
  152.  
  153.        RUNNING THE DRAWING PROGRAM (STD.EXE)
  154.  
  155. The drawing program can be invoked from the command line or by selecting the
  156. D option in the menu program.  The drawing program is capable of loading and
  157. storing screen text files in three formats indicated by the extension:
  158.  
  159. .STF - (default) format for the ShowText system
  160. .BSV - format which can be used with BSAVE/BLOAD in BASIC programs
  161. .SCN - stores direct screen image (4000 bytes).
  162.  
  163. While in the drawing mode, you can access the HELP screen by pressing the F1
  164. key.  Note that the drawing files must be in the current directory.
  165.  
  166. Special Note: If you are designing screens which will be used on monochrome
  167.               systems, you should check the appearance of your screen files
  168.               on a (typical) target system.
  169. ------------------------------------------------------------------------------
  170.  
  171.        RUNNING THE COMPILER PROGRAM (STC.EXE)
  172.  
  173. The compiler program can be invoked from the command line or by selecting the
  174. C option in the menu program.  The program will compile (combine) the specified
  175. .ST command file with any .STF file(s) that it references into a single .EXE
  176. executable file.  Note that the .ST file and all needed .STF files must reside
  177. in the current directory.  The compiler will display any compile-time errors
  178. on the screen.
  179.  
  180. ------------------------------------------------------------------------------
  181.  
  182.        RUNNING THE EXECUTABLE PROGRAM (.EXE) FILES
  183.  
  184. The executable .EXE files can be invoked from the command line or by selecting
  185. the R option in the menu program.  Note that the mouse sensitivity can be
  186. adjusted by pressing CTRL and SHIFT at the same time while your application
  187. program is running.
  188.  
  189.  
  190.        PROGRAMMING CONVENTIONS
  191. ------------------------------------------------------------------------------
  192.        There are many instructions in the ShowText programming language that
  193.        require row and column information. You should be careful about allowing
  194.        the row value to exceed 25 or the column value to exceed 80. These values
  195.        are allowed to be as high as 255 in order to provide the programmer with
  196.        some interesting options, such as linking up to 10 internal buffers
  197.        together with row offsets (from the first buffer) up to 250.  The 
  198.        minimum values are usually adjusted to 1 if zero is given.
  199. ------------------------------------------------------------------------------
  200.        Labels are used to allow the program to resume execution at a different
  201.        location within the program. A label begins with a colon (:) and
  202.        must be defined only once.  Note that a label must not contain embedded
  203.        spaces and may only be 8 characters (or less) in length.  It must
  204.        contain ONLY letters and/or numbers.  For example,
  205.                    GOTO TEST1234
  206.                    ∙∙∙(other statements skipped)∙∙∙
  207.        :TEST1234   PRINT "Done"
  208. ------------------------------------------------------------------------------
  209.        Multiple statements (and labels) are allowed on the same program line by
  210.        separating the statements with a backslash.  For example,
  211.        :QUIT                is the same as          :QUIT\CLS 7,0\EXIT
  212.         CLS 7,0
  213.         EXIT 
  214. ------------------------------------------------------------------------------
  215.        A program line can be continued on the next physical line by ending the
  216.        line with an underscore (_). Any leading spaces on the continuation line
  217.        are trimmed.  If leading spaces are to be preserved on the continuation
  218.        line, then start that line with an underscore (_).  Note: If any 
  219.        physical line starts with an underscore, the underscore is removed.
  220.        ex:  print "this   is _
  221.             _  a   test"
  222.             'preserve embedded spaces by placing underscore at the beginning
  223.        ex:  bfill 0 to 1 (1,1,_
  224.             25,80) 32 31
  225. ------------------------------------------------------------------------------
  226.        [var] is a variable (V0 to V255) or an indexed variable (VV0 to VV255).
  227.        [val] can also be a variable, an indexed variable or a number (0 to 255).
  228.        A variable is similar to an array element. V0 to V255 is similar to
  229.        V(0) to V(255) in some other languages.  An indexed variable uses the
  230.        contents of another variable as an index. VV0 to VV255 is similar to
  231.        V(V(0)) to V(V(255)).  There are still only 256 variables in the 
  232.        system.  Indexing only allows more options for the programmer. 
  233.        Variables may only contain values of 0 to 255.  Variables may assume an
  234.        optional alias by using the (%) sign followed by the alias-name.
  235.        ex: %TEMP=%MISC+4   'See the ALIAS command for more information.
  236. ------------------------------------------------------------------------------
  237.        The single-quote mark (') begins a comment line. The comment continues
  238.        until it reaches either the end of the line or a backspace (\).
  239.        'This is a test
  240.        %A=3 'set %A to 3 \ %B=7 'set %B to 7
  241. ------------------------------------------------------------------------------
  242.        When a compiled .EXE is executed, the DOS command line is placed in
  243.        buffer 1 (row=1,col=1) with its length stored as the <attribute> of the
  244.        character in buffer 1 (row=3,col=1).  The directory of the current EXE
  245.        file is stored in buffer 1 (row=4,col=1) with its length stored as the
  246.        <attribute> of the character in buffer 1 (row=5,col=1). The trailing
  247.        backslash (\) is always the last character in the EXE-directory string.
  248.        Note: No capitalization is performed on either string.
  249.  
  250.        PROGRAMMING CONVENTIONS (cont'd)
  251.  
  252.        SPECIAL NOTES ABOUT IF STATEMENTS !!!
  253. ------------------------------------------------------------------------------
  254.        The (IF) statements normally assume that a GOTO will be executed if the
  255.        specified conditions are met.  The keyword GOTO is not necessary.  The
  256.        keyword GOSUB may be specified in any (IF) statement in order to allow
  257.        the program to jump to a subroutine. This rule works for ANY (IF)
  258.        statements.  For example,
  259.        IF CLK(10,25,15,60) TEST         would GOTO TEST  if condition is true 
  260.        IF CLK(10,25,15,60) GOSUB TEST   would GOSUB TEST if condition is true
  261. ------------------------------------------------------------------------------
  262.        ShowText now supports the standard IF-statement formats, such as:
  263.  
  264.        1. single-line IF
  265.           IF condition THEN true_action
  266.  
  267.        2. single-line IF
  268.           IF condition THEN true_action ELSE false_action
  269.  
  270.        3. block IF
  271.           IF condition_1 THEN
  272.              true_action_1
  273.           ELSEIF condition_2
  274.              false_action_1 and true_action_2
  275.           ELSE
  276.              false_action_1 and false_action_2
  277.           ENDIF
  278.  
  279.        SHOWTEXT PROGRAMMING LANGUAGE
  280. ------------------------------------------------------------------------------
  281.        ;minvalue,variable,maxvalue
  282.        ;minvalue,variable,maxvalue;minvalue,variable,maxvalue  ....etc....
  283.  
  284.        This statement forces the variable to be within the specified range
  285.        (minvalue to maxvalue (inclusive)). More than one variable can be forced
  286.        on the same program line by using another semi-colon (;). Obviously only
  287.        normal variables and indexed variables can be forced, although the
  288.        minimum and maximum values can be any type of standard value. If either
  289.        of the limits are omitted, the defaults are minvalue=0 and maxvalue=255.
  290.        Example: ;5,%row,25 ;10,%col,70  'forces 5 <= %row <= 25
  291.                                         ' and  10 <= %col <= 70
  292. ------------------------------------------------------------------------------
  293.        ALIAS %aliasname=var,%aliasname=var ...etc
  294.  
  295.        Variables may assume an optional alias by using the (%) sign followed 
  296.        by the alias-name (using ONLY letters and/or numbers). Each alias can
  297.        be assigned only once. If a previously unassigned alias is encountered
  298.        in the program, it will be automatically assigned to the highest
  299.        subscript variable that does not already have an alias. Please note that
  300.        there are only 256 variables in the system and the variables can still
  301.        be accessed directly by using the Vxxx form.
  302.        ALIAS %TEMP=V4,%MISC=V8 ────────┐
  303.        %TEMP=7 \ %MISC = %TEMP + V3 ───┴───is the same as V4=7 \ V8=V4+V3
  304.        Note: All alias names are converted to UPPERCASE by the compiler.
  305. ------------------------------------------------------------------------------
  306.        ARROWS
  307.        ARROWS OFF
  308.  
  309.        These two commands control how the arrow keys (up,down,left and right)
  310.        are interpreted by the system.  The first form (ARROWS) will cause the
  311.        program to move the screen cursor in response to the arrow keys. This
  312.        is the default mode.  The second form will cause the program to return
  313.        a keycode (up=200, down=208, left=203 and right=205) without moving the
  314.        screen cursor.  The mouse, if present, will continue to be able to move
  315.        the cursor.
  316. ------------------------------------------------------------------------------
  317.        ATTR val
  318.  
  319.        This instruction changes the current screen color (for printing) to val,
  320.        where val is the decimal equivalent of the binary attribute code
  321.        in the form:
  322.  
  323.        bbbbbbbb
  324.        │└─┤└──┴─── foreground color 0 to 15
  325.        │  └─────── background color 0 to 7
  326.        └────────── blink bit (foreground will blink if set)
  327.  
  328.        (see the table for the COLOR statement to determine base colors)
  329.        Note: There is a difference between the organization of the 
  330.        attribute-byte (above) and the values used with the COLOR statement,
  331.        in relation to the coding of the blink bit.
  332.        This instruction is useful where the default colors have been stored in
  333.        a variable with ( var=[AT;] ).  The color can be restored very easily
  334.        with (ATTR var).
  335.        example:  ATTR 31 would set foreground to white and background to blue
  336.                  white=15  blue=1   color_byte= (1*16) + 15 = 31
  337.  
  338.        BEEP
  339.  
  340.        This instruction causes the PC speaker to emit a short beep (tone).
  341.        Note that the program will pause briefly until the beep is finished.
  342. ------------------------------------------------------------------------------
  343.        BCOPY source TO dest (row1,col1,row2,col2)
  344.        BCOPY source TO dest (row1,col1,row2,col2) OFFSET (row3,col3)
  345.  
  346.        This instruction (in both forms) copies a block of text from the
  347.        source buffer (0 to 63) to the destination buffer (0 to 63).  The
  348.        block is defined by the row1,col1 (upper-left corner) and the row2,col2
  349.        (lower-right corner).  The first form of the instruction copies the
  350.        text to the same part of the buffer.  The second form of the instruction
  351.        copies the text to the upper-left corner defined by row3,col3 providing
  352.        a way to offset the text in the destination buffer.  Variables and/or
  353.        numbers may be used for the row/column information. The word OFFSET is
  354.        optional.
  355.        Note: buffer 0 is the screen - buffers 1 to 63 are internal buffers
  356.        example: BCOPY 1 TO 0 (1,1,25,80) 'copy entire buffer 1 to screen
  357. ----------------------------------------------------------------------------
  358.        BFILL buffer (row1,col1,row2,col2) ASCII val
  359.        BFILL buffer (row1,col1,row2,col2) ATTR val
  360.        BFILL buffer (row1,col1,row2,col2) val val
  361.  
  362.        This instruction (in all three forms) will fill an area in the buffer
  363.        with an ASCII character and/or an attribute (foreground/background 
  364.        color).  The boundaries of the block are defined by row1,col1 (as the
  365.        upper-left corner) and row2,col2 (as the lower-right corner). The first
  366.        form, with the keyword ASCII, will only fill the block with the ASCII
  367.        character code specified in val.  The second form, with the ATTR keyword,
  368.        will only fill the block with the foreground/background color specified
  369.        as an attribute in val.  The third form, with two values, will fill the
  370.        block with the ASCII character code specified in the first val and the
  371.        foreground/background color specified as an attribute in the second val.
  372.        See the ATTR command for a description of an attribute byte.
  373.        e.g. BFILL 0 (11,42,15,61) 32 7
  374.             fills the area on the screen with black spaces.
  375.        Note: buf=0 for screen or buf=1 through 63 for internal buffers
  376. -------------------------------------------------------------------------------
  377.        BMOD buffer (row1,col1,row2,col2) ANDmask, ORmask, XORmask
  378.  
  379.        The Block-MODify-attributes instruction causes the color attributes
  380.        in the specified "block" (or "box") in the selected buffer to be
  381.        ANDed with the ANDmask, ORed with the ORmask, and XORed with the
  382.        XORmask (in that order).  If a mask value is omitted, its default value
  383.        will be used. The defaults are ANDmask=255, ORmask=0 and XORmask=0.
  384.        ex: BMOD 0 (1,1,25,80),8     'turn BOLD  ON   for entire screen
  385.            BMOD 0 (1,1,25,80)247    'turn BOLD  OFF  for entire screen
  386.            BMOD 0 (1,1,25,80),128   'turn BLINK ON   for entire screen
  387.            BMOD 0 (1,1,25,80)127    'turn BLINK OFF  for entire screen
  388.  
  389.        ex: BMOD 0 (1,1,25,80),,255 \ WAIT .2 \ BMOD 0 (1,1,25,80),,255
  390.            'This will "flash" the screen
  391.  
  392.        BSWAP buffer TO buffer (row1,col1,row2,col2)
  393.        BSWAP buffer TO buffer (row1,col1,row2,col2) OFFSET (row3,col3)
  394.  
  395.        This instruction is nearly identical to the BCOPY command, except
  396.        that the two blocks are swapped.  see: BCOPY
  397.        example: BSWAP 0 TO 1 (1,1,25,80) 'swap entire screen with buffer 1
  398. -------------------------------------------------------------------------------
  399.        CALL subroutine (val1,val2,...etc...) var1,var2,...etc...
  400.             └───┬────┘  └────────┬────────┘  └────────┬────────┘
  401.               label     calling arguments    returning arguments
  402.                         are PUSHed on stack  are POPped off stack
  403.                         {any type of value}  {normal (non-indexed) variables}
  404.  
  405.        This instruction calls a subroutine by actually using the following:
  406.        PUSH val1,val2,...etc...\GOSUB subroutine\POP var1,var2,...etc...
  407.        Both the calling arguments (PUSHed onto the stack) and the returning
  408.        arguments (POPped off the stack) are optional. The subroutine itself must
  409.        actually POP the calling arguments off the stack and PUSH the returning
  410.        arguments onto the stack - IN THE OPPOSITE ORDER - from the order of the
  411.        list in the CALL statement. Note that the subroutine is in the same
  412.        memory block as the rest of the program, i.e. its variables are still
  413.        global in nature (not local to the subroutine). The number of arguments
  414.        in either list can vary.
  415.  
  416.        Example: CALL Temp (1,V2,VV3,V4+5) V6,V7,V8
  417.                 would be equivalent to:
  418.                 PUSH 1,V2,VV3,V4+5 \ GOSUB Temp \ POP V6,V7,V8
  419.  
  420.        The subroutine could then access the info (in reverse order!) as follows:
  421.  
  422.        Temp:    POP %Arg4, %Arg3, %Arg2, %Arg1
  423.                 ∙∙∙
  424.                 ∙∙∙this would make %Arg1=1, %Arg2=V2, %Arg3=VV3, %Arg4=V4+5
  425.                 ∙∙∙
  426.                 ∙∙∙perform the necessary actions∙∙∙
  427.                 ∙∙∙
  428.                 PUSH %Arg8, %Arg7, %Arg6
  429.                 ∙∙∙
  430.                 ∙∙∙after RETurn this would make V6=%Arg6, V7=%Arg7, V8=%Arg8
  431.                 ∙∙∙
  432.                 RET
  433.  
  434.        Important Note:
  435.        If the compiler detects an error when evaluating a CALL instruction,
  436.        the instruction is shown as PUSH ... \ GOSUB ... \ POP ... because the
  437.        CALL instruction is mapped into these equivalent instructions before
  438.        it is evaluated. This saved quite a bit of compiler code to do it this
  439.        way :-)
  440.  
  441.        See the PUSH, POP and GOSUB instructions for more information.
  442.  
  443.        C@ row,column
  444.  
  445.        This instruction locates the screen cursor at the specified row 
  446.        (1 to 25) and column (1 to 80).  For example, C@12,40 would locate
  447.        the screen cursor at row 12 and column 40.
  448. -------------------------------------------------------------------------------
  449.        CHK    and    NOCHK
  450.  
  451.        These instructions turn the keyboard/mouse monitoring routines ON/OFF.
  452.        The program normally checks the keyboard/mouse status between each
  453.        statement.  This allows quick response to user input especially the
  454.        interrupt keys specified in the ON INTKEYn statements, but can also
  455.        slow the program down during intensive tasks such as repetitive PEEK
  456.        and POKE operations.  The NOCHK command causes the program to ignore
  457.        the keyboard and mouse except when a WAIT or WAITKEY command is
  458.        executed.  This statement should be used carefully because it can cause
  459.        the cursor to 'freeze' at a point on the screen between WAIT and/or
  460.        WAITKEY statements.  The CHK command should be executed as soon as
  461.        possible.  It may occasionally be necessary for the RST K
  462.        command to be executed prior to executing the CHK statement, because
  463.        it will clear the PC keyboard buffer of any input encountered while the
  464.        NOCHK was in effect.
  465. ----------------------------------------------------------------------------
  466.        CLS   or   CLS foreground,background
  467.  
  468.        This instruction (in both forms) clears the screen.  The first form
  469.        clears the screen in the current foreground/background colors.  The
  470.        second form is equivalent to COLOR foreground,background\CLS. Note that
  471.        the print cursor is set to row=1 and column=1.  See the table of colors
  472.        for the COLOR command.
  473.        ex: CLS 15,1 'clear screen white foreground (15) & blue background (1)
  474. ----------------------------------------------------------------------------
  475.        COLOR foreground
  476.        COLOR foreground,background
  477.  
  478.        This instruction (in both forms) changes the default screen color
  479.        (for printing, CLS etc).  The first form changes only the foreground
  480.        while the second form changes both the foreground and background colors.
  481.  
  482.        Foreground (fg)                      Background (bg)
  483.        ------------------                   --------------------
  484.        0  black                             0   black
  485.        1  blue                              1   blue
  486.        2  green                             2   green
  487.        3  cyan (blue-green)                 3   cyan (blue-green)
  488.        4  red                               4   red
  489.        5  magenta (purple)                  5   magenta (purple)
  490.        6  brown                             6   brown
  491.        7  light gray                        7   dark gray
  492.        8  dark gray
  493.        9  bright blue                ┌──────────────────────────────────────┐
  494.       10  bright green               │Note: Text can be made to blink by    │
  495.       11  bright cyan (blue-green)   │adding 16 to the foreground color.    │
  496.       12  bright red                 │For example: using 4=red and 3=cyan   │
  497.       13  bright magenta (purple)    │COLOR  4,3  'normal red fg and cyan bg│
  498.       14  bright yellow              │COLOR 20,3  'blink  red fg and cyan bg│
  499.       15  bright white               └──────────────────────────────────────┘
  500.  
  501.        COPY (source,destination)
  502.        COPY (source,destination) optionalfade
  503.        COPY ( $(buffer,row,column1,column2) , destinationbuffer) optionalfade
  504.  
  505.        This instruction is the heart of the ShowText system.  In all forms,
  506.        it allows an entire screen image to be copied from the source to the
  507.        destination.
  508.  
  509.        The source and destination may be:
  510.              0        which is the screen (or virtual screen)
  511.              1 to 63  which are internal buffers
  512.              variables V0 TO V255
  513.              indexed variables VV0 to VV255.
  514.  
  515.        The source may also be a library file specified by up to 8 characters.
  516.        The default (only) extension is .STF.  These files must be present in
  517.        the current directory at compile time (using STC.EXE).  These files are
  518.        stored in the resultant .EXE executable file.  This means that the
  519.        individual (.STF) files do not need to be distributed to the end user of
  520.        the (.EXE) executable file.  The file names must NOT be in the same form
  521.        as a variable, number or math operation (e.g. 123,V123,VV123,TEST-123,
  522.        ABC&DEF etc.) since the compiler would assume that you meant to use an
  523.        actual variable, number or math operation as the source buffer number.
  524.        The reserved math operator symbols + - * / ~ ^ < = > ` & @ # | MUST NOT
  525.        be used as part of a filename in the COPY(filename,bfr) instruction.
  526.  
  527.        For example, COPY (TEST,7) would copy the file TEST.STF (which had 
  528.        been stored in library format inside the .EXE file) to internal buffer 7.
  529.  
  530.        The second form of this instruction may be used whenever the destination 
  531.        is buffer 0 (which is the screen).  The "fade" value can be a number or a
  532.        variable and tells the program how to draw the image on the screen.  The
  533.        ShowText system supports a fairly large number of fades.  If a fade is
  534.        specified that is greater than the number of available fades, the default
  535.        fade of 0 (quick) is used.  If the fade number 255 is used, the program
  536.        will pick a fade at random.
  537.  
  538.        For example, V1=4 \ COPY (V1,0) 1
  539.                     '---or---
  540.                     COPY (4,0) 1
  541.        would copy the screen image in buffer 4 to the screen using the fizz
  542.        fade.  Please refer to the table of available fades in the appendix of
  543.        this documentation file.
  544.  
  545.        The third form of this instruction is used to search the internal library
  546.        directory for the filename (8 characters) which is specified by the
  547.        buffer text string.  The EXTRA variable is set to 255 if the search is
  548.        successful and is reset to zero if this command fails to find the
  549.        filename in the internal library directory.  Please refer to the $LIB ADD
  550.        compiler directive for information about making sure that certain files
  551.        are placed in the internal library.  Note: The filename, that is used
  552.        with the third form, MUST be in uppercase format (ex: FILENAME).  The
  553.        internal directory is maintained in UPPERcase format.
  554.  
  555.        ex: COPY ( $(63,1,12,19) , 2 ) 55    would search the internal library
  556.        directory for the filename specified in the buffer text string located
  557.        in buffer 63 on row 1 between columns 12 and 19. If the filename is
  558.        found, it would be copied to buffer 2 using fade 55.
  559.  
  560.        CSR LIM (toprow , leftmostcolumn , bottomrow , rightmostcolumn)
  561.        CSR LIM
  562.  
  563.        The first form, with operands, sets the limits on the screen cursor
  564.        location and the second form, with no operands, restores the limits 
  565.        to include the entire screen.
  566.        ex: WINDOW (15,35,25,65) 100 \ CSR LIM (15,35,25,65)
  567.            'this would force the cursor to stay inside the window
  568.            'upper-left (row=15,column=35) and lower-right (row=25,column=65)
  569. ----------------------------------------------------------------------------
  570.        CSR ON num TO num            (where num is the scan line 0 to 7)
  571.        CSR                          (default is CSR ON)
  572.        CSR OFF
  573.  
  574.        The first form (CSR ON num TO num ) will cause the cursor to be
  575.        visible.  The two numbers determine the size of the cursor.  Scan
  576.        line 0 is the top, while scan line 7 is the bottom line (of the cursor)
  577.        on a VGA monitor.  The form (CSR OFF) causes the cursor to be
  578.        invisible.  Variables can NOT be used to specify the scan lines.
  579.        Note: When a program (.EXE) is run, the cursor will initially be off.
  580.        For example:
  581.        CSR ON 0 TO 7 makes a large cursor appear on the screen
  582.        CSR OFF turns the cursor off
  583.        CSR with no arguments turns cursor on using last scan numbers 0 & 7
  584.  
  585. ShowText Language - Special Directory Commands
  586.  
  587.       DIRTOP
  588.       DIRBOT
  589.       DIRPRV
  590.       DIRNXT
  591.       DIRCMP  or  DIRCMP "filename"  or  DIRCMP $(bfr,row,startcolumn,endcolumn)
  592.       DIRCPY buffer,fade
  593.       DIRFND "filename" or DIRFND $(bfr,row,startcolumn,endcolumn)
  594.       DIRPRT buffer,row,column,attribute
  595.  
  596. If the compiled program, in .EXE form, contains any imbedded screen text files,
  597. then an internal directory of these 8-character filenames is maintained by the
  598. program (in alpha sort order).  These commands (above) allow limited access to
  599. this area.
  600.  
  601. A directory pointer is also maintained, although its exact value is not
  602. available, since up to 2048 screen files can be stored; but all variables have
  603. a maximum value of 255.  The [DIR] system variable returns information ABOUT the
  604. internal directory pointer but not its actual value.  These return values are:
  605.  0=no files in directory
  606.  1=now pointing to first directory entry (i.e. after DIRTOP cmd)
  607.  2=now pointing to last  directory entry (i.e. after DIRBOT cmd)
  608.  3=pointing to first and last directory entry (i.e. only 1 file in library)
  609.  4=now pointing to somewhere between first and last entries
  610.  
  611. The DIRTOP instruction places the directory pointer at the top (first) entry.
  612.  
  613. The DIRBOT instruction places the directory pointer at the bottom (last) entry.
  614.  
  615. The DIRPRV instruction places the directory pointer at the previous entry,
  616. unless the directory pointer was already pointing at the top (first) entry.
  617.  
  618. The DIRNXT instruction places the directory pointer at the next entry,
  619. unless the directory pointer was already pointing at the bottom (last) entry.
  620.  
  621. Note: The [DIR] system variable is updated each time any of these four 
  622.       instructions are executed.
  623.  
  624. The DIRCMP instruction CoMPares the specified text "filename" with the current
  625. directory entry (stored internally in memory).  If these match, the EXTRA system
  626. variable [X] is set to 255, otherwise it is reset to zero. The question-mark (?)
  627. can be used as a wildcard in the "filename" text string.  This text string must
  628. be from 1 to 8 characters in length, and only the number of characters in the
  629. text string will be compared.  
  630. Note that the buffer text string $(bfr,row,startcol,endcol) can be used as the
  631. comparison text, although the filename MUST be in UPPERcase form (e.g.FILENAME)
  632. ex#1: DIRCMP "ABC"       if the first 3 characters of the internal directory
  633.                          entry are ABC, then [X]=255 otherwise [X]=0.
  634. ex#2: DIRCMP "ABC??XYZ"  if the first 3 characters of the internal directory
  635.                          entry are ABC and the last 3 characters are XYZ, then
  636.                          the EXTRA system variable [X]=255 otherwise [X]=0.
  637. ex#3: DIRCMP $(0,12,1,8) compares the text (that resides in buffer 0, on row 12,
  638.                          between columns 1 and 8) with the internal directory
  639.                          entry. If it matches, [X]=255 otherwise [X]=0.
  640. Note: If DIRCMP is used without an operand, it uses the LAST text specified.
  641.  
  642. ShowText Language - Special Directory Commands - (continued)
  643.  
  644. The DIRCPY instruction is used to CoPY the file, currently being pointed to
  645. by the directory-entry-pointer, into the specified buffer, using the specified
  646. fade value.  Note: the fade value must be specified. If no fade is desired, 
  647. simply use a fade value of zero.
  648. Ex: DIRTOP
  649.     DIRCPY 0,2
  650.     'would copy the first file (in the internal library directory)
  651.     'into buffer 0 (the screen) using the melt-down fade (#2).            
  652.  
  653. The DIRFND attempts to FiND the specified filename in the internal library
  654. directory.  If it is successful, the EXTRA system variable [X] is set to 255,
  655. otherwise it is reset to zero.  The directory-entry-pointer is positioned
  656. at the specified entry (if found), otherwise it is placed at the position
  657. that would have been occupied by the specified entry.  Note that NO wildcards
  658. are permitted with this instruction and that the specified filename must be
  659. 8 characters in length, otherwise it will be right-padded with spaces. 
  660.                                                       
  661. The DIRPRT instruction PRinTs the 8-character internal directory-entry filename
  662. using the specified buffer, row, column and attribute information.
  663. ex: DIRPRT 0,25,21,31 prints the 8-character internal directory-entry filename
  664.                       to buffer 0, on row 25, starting at column 21, using an
  665.                       attribute value of 31 (bright white on blue).
  666.  
  667. form1: DO {WHILE|UNTIL|UNLESS} condition
  668.        ∙∙∙                              
  669.        ∙∙∙statements∙∙∙
  670.        ∙∙∙                              
  671.        LOOP                             
  672.  
  673. form2: DO
  674.        ∙∙∙
  675.        ∙∙∙statements∙∙∙
  676.        ∙∙∙
  677.        LOOP {WHILE|UNTIL|UNLESS} condition
  678.  
  679.        The first form of the DO-LOOP tests the condition for looping at the
  680.        beginning of the loop.  The second form performs the test at the end of 
  681.        the loop.  One of the keywords WHILE/UNTIL/UNLESS is necessary to specify
  682.        which type of test to perform.  Looping will continue as long as the
  683.        conditions are met.  For example, the following two loops would print
  684.        the numbers 1 through 10.
  685.  
  686.          %I=0                            %I=1
  687.          DO                              DO WHILE %I<=10
  688.          %I++                            PRINT %I,3Q
  689.          PRINT %I,3Q                     %I++
  690.          LOOP UNTIL %I=10                LOOP
  691.  
  692.        Special Note: The GOLOOP instruction can be used to perform a GOTO to
  693.        the next LOOP instruction as if a label was assigned to it.  The
  694.        EXITDO/XDO instructions can be used to perform a GOTO to the instruction
  695.        immediately following the next LOOP instruction.  These instructions will
  696.        properly handle nested DO/LOOPs, so that a GOLOOP (or EXITDO or XDO) in
  697.        an outer loop will seek the appropriate LOOP instruction.
  698. -------------------------------------------------------------------------------
  699.        ERRORLEVEL val
  700.  
  701.        This instruction sets the DOS ERRORLEVEL variable to (val).  The last
  702.        ERRORLEVEL statement executed before the program exits will determine
  703.        the value which is returned to DOS.  This value can be tested by DOS
  704.        in a batch file to allow branching or conditional execution of a
  705.        particular batch command.  This makes it possible to use ShowText in
  706.        a batch file menuing system.  The argument (val) can be a number or a
  707.        variable.  Its initial value is zero.
  708.        example: ERRORLEVEL 7 would set the DOS error level to 7
  709. ----------------------------------------------------------------------------
  710.        EXIT    {or X}
  711.        EXITC   {or XC}
  712.  
  713.        The EXIT instruction allows the program to return to DOS (or to the
  714.        ShowText menu).  If the .EXE program is invoked from DOS, then it
  715.        will exit to DOS.  Note that the screen is not cleared, and the DOS
  716.        cursor is set to the last row value of the print cursor.  If you wish
  717.        to end a program with the screen cleared and with the DOS cursor at
  718.        row 1, then use the command EXITC.
  719.  
  720.        FOR loop_var = loop1 to loop2 STEP  loop3     {pos.steps  loop1<=loop2 )
  721.        FOR loop_var = loop1 to loop2 NSTEP loop3     {neg.steps  loop1>=loop2 }
  722.        NEXT loop_var
  723.  
  724.        (where the loop variable (loop_var) must be a variable V0 to V255,
  725.         or an ALIASed variable (e.g. %i) and must NOT be an indexed variable.)
  726.        (loop1,loop2 and loop3 can be numbers, variables or indexed variables)
  727.  
  728.        These instructions allow the program to loop through a section of
  729.        program code - between the FOR and the NEXT statements.
  730.        loop1 = starting value of the loop variable (loop_var).
  731.        loop2 = ending value for the loop variable
  732.        loop3 = incremental step between iterations (always greater than zero)
  733.                (default is 1 if the word STEP and loop3 are not specified)
  734.        For example:   FOR V1=3 TO 9 STEP 2 \ PRINT V1,1 \ NEXT V1
  735.        would cause the variable V1 to be printed with values of 3,5,7 and 9.
  736.        Note: Do NOT jump from the outside of a FOR/NEXT loop into the inside!
  737.  
  738.        The FOR/NEXT loops can be nested, but be careful to nest these
  739.        loops properly.
  740.        e.g.   right:  FOR V1=1 TO 4 \ FOR V2=3 TO 9 \ NEXT V2 \ NEXT V1
  741.               wrong:  FOR V1=1 TO 4 \ FOR V2=3 TO 9 \ NEXT V1 \ NEXT V2
  742.        If NEXT is specified without a variable, the last open FOR loop
  743.        variable is used.  For example,
  744.        FOR V1=1 TO 10 \ FOR V2=3 TO 5 \ NEXT \ NEXT
  745.        The first NEXT closes the FOR V2 loop and the second NEXT closes the
  746.        FOR V1 loop.
  747.  
  748.        Special Note: The GONEXT instruction can be used to perform a GOTO to
  749.        the next NEXT instruction as if a label was assigned to it.  The EXITFOR
  750.        instruction can be used to perform a GOTO to the instruction immediately
  751.        following the next NEXT instruction.  These instructions will properly
  752.        handle nested FOR/NEXT loops, so that a GONEXT (or EXITFOR) in an outer
  753.        loop will seek the appropriate NEXT instruction.
  754. ------------------------------------------------------------------------------
  755.        GOTO label         {or GT label}
  756.  
  757.        This instruction transfers control to the specified label.  Program
  758.        execution will continue at that point in the program code.  The label
  759.        can be preceded by a (:) in the GOTO statement.
  760.        For example   GOTO :TEST    and    GOTO TEST  are identical in operation.
  761. ------------------------------------------------------------------------------
  762.        GOSUB label        {or GS label}
  763.        RETURN or RET
  764.  
  765.        The GOSUB statement pushes the address immediately following the GOSUB
  766.        onto the stack.  The program will then transfer control to the specified
  767.        label (like a GOTO).  The subroutine will continue execution until a
  768.        RETURN is encountered.  The RETURN will pop an address off the stack and
  769.        will transfer control to that address.  If the stack is empty (as in the
  770.        case when a RETURN without GOSUB situation occurs) the RETURN statement
  771.        would not signal an error but would simply do nothing.
  772.        example: :HERE  \ GOSUB TEMP
  773.                 :THERE \ ...other statements...
  774.                 :TEMP  \ PRINT "subroutine called" \ RET
  775.        When the label (HERE) is reached, control goes to (TEMP).  The RET
  776.        causes program execution to continue at label (THERE).
  777.  
  778.        IF BSAME buf TO buf (row1,col1,row2,col2) (row3,col3) label
  779.        IF BDIFF buf TO buf (row1,col1,row2,col2) (row3,col3) label
  780.  
  781.        The first instruction compares the contents of two buffers and performs
  782.        a GOTO label if the blocks are the same.  If the specified blocks are
  783.        not the same, program execution continues at the statement following the
  784.        IF BSAME instruction.  The comparison is performed on ASCII text only
  785.        (i.e. the attribute is not checked).  The coordinates row1,col1,row2,col2
  786.        correspond to the upper-left and lower-right corners (respectively) of
  787.        the block in the first buffer.  The coordinates row3,col3 correspond to
  788.        upper-left corner of the block in the second buffer.  Note that if the
  789.        (row3,col3) term is omitted then the same coordinates are used in BOTH
  790.        blocks/buffers. 
  791.  
  792.        example: IF BSAME 0 TO 1 (1,1,25,80) (1,1) ALIKE
  793.               'if entire screen is identical to buffer 1 then go to label ALIKE 
  794.               'else continue at statement following this IF BSAME instruction
  795.        Note: The IF BDIFF instruction will GOTO label if the blocks are 
  796.              different.
  797.  
  798.        Buffer 0=screen and buffer 1 through 63 are internal buffers.
  799.  
  800.  
  801.        IF CLK (row1,col1,row2,col2) label
  802.        IF NOT CLK (row1,col1,row2,col2) label
  803.  
  804.        When the user presses a key (or a mouse button), the ShowText system
  805.        generates three things: a KEY (0 to 255) value , a ROW CLICK
  806.        (row 1 to 25) value and a COLUMN CLICK (column 1 to 80) value.  These
  807.        values are placed in a 63 byte circular (first-in-first-out) buffer.
  808.        The O-N-L-Y way to make these values available to the program is to
  809.        execute a WAITKEY command.  The WAITKEY command retrieves the next
  810.        character in the keyclick buffer.  If no user input is waiting then
  811.        KEY=0 (NULL),ROW CLICK=0 and COLUMN CLICK=0.
  812.  
  813.        The IF CLK and IF NOT CLK commands simply test the last (row,column)
  814.        click values which were made available by the WAITKEY command.
  815.        A block on the screen defined by the upper-left (row1,col1) and the 
  816.        lower-right (row2,col2) coordinates is tested to see if the last click
  817.        was within its range.  The first form (IF CLK) will execute a GOTO
  818.        label if it was within its defined block.  The second form (IF NOT CLK)
  819.        will execute a GOTO label if it was not within its defined block.
  820.  
  821.        If either of the IF statements fail, the program continues execution
  822.        at the statement immediately following the IF statement.  This is the
  823.        way all of the IF statements work.
  824.  
  825.        example: IF CLK (25,1,25,80) TEMP
  826.        If the mouse/keyboard is pressed while the cursor is on the bottom
  827.        row (25), then program execution will continue at label TEMP.
  828. ----------------------------------------------------------------------------
  829.  
  830.        IF CSR (row1,col1,row2,col2) label
  831.        IF NOT CSR (row1,col1,row2,col2) label
  832.  
  833.        where row1,col1 define the upper-left corner of the test block while
  834.        row2,col2 define the lower-right corner.
  835.  
  836.        These instructions check the location of the screen cursor to determine
  837.        if it is within the defined block.  The IF CSR instruction will
  838.        execute a GOTO label if the screen cursor is within its defined block.
  839.        The IF NOT CSR will execute a GOTO label if the screen cursor is not
  840.        within its defined block.
  841.  
  842.        example: IF CSR (25,1,25,80) TEMP
  843.        If the mouse/keyboard moves the screen cursor to the bottom
  844.        row (25), then program execution will continue at label TEMP.
  845.  
  846.        IF KEY key label
  847.        IF NOT KEY key label
  848.  
  849.        When the user presses a key (or a mouse button), the ShowText system
  850.        generates three things: a KEY (0 to 255) value , a ROW CLICK
  851.        (row 1 to 25) value and an COLUMN CLICK (column 1 to 80) value. These
  852.        values are placed in a 63 byte circular (first-in-first-out) buffer.
  853.        The O-N-L-Y way to make these values available to the program is to
  854.        execute a WAITKEY command.  The WAITKEY command retrieves the next
  855.        character in the keyclick buffer.  If no user input is waiting then
  856.        KEY=0 (NULL), ROW CLICK=0 and COLUMN CLICK=0.
  857.  
  858.        The IF KEY and IF NOT KEY commands will test the KEY value for a match.
  859.        The first form (IF KEY) will execute a GOTO label if the KEY value
  860.        matches its test value.  The second form (IF NOT KEY) will execute a
  861.        GOTO label if the KEY value does not match its test value. Note that
  862.        the arrow-keys (up,down,left,right) can NOT be trapped.
  863.  
  864.        e.g.  IF KEY ESC TEST would GOTO TEST if the last key was an escape.
  865.              IF NOT KEY NULL TEST would GOTO TEST if any key was pressed.
  866.  
  867.        other valid examples include:
  868.  
  869.        IF KEY ALT F1 TEST       (note that ALT CTRL SHIFT can be used but
  870.        IF KEY CTRL F1 TEST       not in the same statement)
  871.        IF KEY SHIFT F1 TEST
  872.        IF KEY SPACE TEST
  873.        IF KEY A TEST   (note: keyboard input is tested as capitalized (a=A) )
  874.        IF KEY 7 TEST
  875.        IF KEY $ TEST
  876. ----------------------------------------------------------------------------
  877.        IF Tn >= seconds label
  878.        IF Tn < seconds label
  879.  
  880.        where n=0 to 15
  881.        where seconds is a number between 0 and 3600 seconds
  882.        (note: a math expression for timer number is NOT allowed here)
  883.        (note: The >= and < comparison operators are the ONLY ones allowed)
  884.  
  885.        These instructions check the specifed 16 bit timer to determine how
  886.        much time (in seconds) has elapsed since the last RST Tn was
  887.        executed.  The [ IF Tn >= ] will execute a GOTO label if the timer
  888.        value equals or exceeds the seconds value.  The [ IF Tn < ] will
  889.        execute a GOTO label if the timer value is less than the seconds value.
  890.        If the timer itself is allowed to exceed 3600.8 (which is a little more
  891.        than 1 hour ), the timer value is maintained at 3600.8 seconds (which
  892.        is internally expressed as 65535/18.2).  The resolution is about
  893.        1/18.2 of a second.  There are sixteen of these 16-bit timers available.
  894.        example:          RST T2           \ ' resets timer#2 to 0
  895.                  :LOOP \ IF T2 < 4.5 LOOP \ ' stays in loop for 4.5 seconds
  896.  
  897.        IF var <  val label
  898.        IF var <= val label
  899.        IF var <> val label
  900.        IF var =  val label
  901.        IF var >  val label
  902.        IF var >= val label
  903.  
  904.        These instructions test the variable (var) with the specified value 
  905.       (val).  A GOTO label is executed if the condition is true.
  906.  
  907.        example:  IF V1 <= V2 TEMP
  908.                  would go to label TEMP if V1 is less than or equal to V2
  909.  
  910.                  IF %ABC = %XYZ+2 TEST
  911.                  would go to label TEST if variable %ABC is equal to (%XYZ + 2)
  912. --------------------------------------------------------------------------------
  913.        IF var label      'GOTO label if var is non-zero
  914.        IF NOT var label  'GOTO label if var is zero
  915. --------------------------------------------------------------------------------
  916.       *See the special note about IF statements in the PROGRAMMING CONVENTIONS
  917.        section near the beginning of this document.
  918.  
  919.        INPUT TEXT (row, startingcolumn, endingcolumn, attribute)
  920.        INPUT TEXT CAPS (row, startingcolumn, endingcolumn, attribute)
  921.        INPUT var  (row, startingcolumn, endingcolumn, attribute)
  922.  
  923.        The INPUT TEXT instruction allows the user to type a string of text
  924.        on the screen.  An edit-window is opened on the screen on the specified
  925.        row and between startingcolumn and endingcolumn.  NO error checking is
  926.        done on the coordinates.  Do NOT allow the input field to wrap around
  927.        to the next screen row ! The color of the input text is determined by 
  928.        the attribute value (see ATTR command).
  929.        Note: The default screen cursor/colors are not changed by this command.
  930.        The text can be upper or lower case but if the CAPS keyword appears in
  931.        the command, the text will be capitalized when the input is finished.
  932.        This text is only placed on the screen, but BCOPY can be used to
  933.        move it to a buffer.  The left-arrow, right-arrow and backspace are the
  934.        editing keys.  The Enter and Escape keys will terminate the text input
  935.        routine.  It is possible to use var=[K] to find out which key
  936.        terminated the routine (Enter=13 or Escape=27).  The var=[.C]
  937.        command will return the column position of the rightmost non-space
  938.        character in the input text field.  All type-ahead is cancelled prior
  939.        to executing INPUT TEXT.
  940.        The INPUT var command is identical except that the text string is 
  941.        converted to a number which is then placed in the specified variable.
  942.        Note that non-numeric characters in the text field are actually ignored.
  943.        The number must be in the range 0 to 255 or else the specified variable
  944.        will contain 0 (zero) and the EXTRA [X] variable will contain 255.
  945.  
  946.        INPUT TEXT (1,10,20,31) would input white/blue text on
  947.                                row 1 between columns 10 and 20 (mixed-case)
  948.        INPUT TEXT CAPS (1,10,20,31) would input white/blue text on
  949.                                     row 1 between columns 10 and 20 and then
  950.                                     would capitalize it on-screen
  951.        INPUT V1 (1,10,20,31) would input a numeric value using white/blue text
  952.                              on row 1 between columns 10 and 20
  953.  
  954.        Note: The screensaver function will not operate during the INPUT TEXT 
  955.              function. You may substitute a question mark (?) for INPUT.
  956.                        ?TEXT (row, startingcolumn, endingcolumn, attribute)
  957.                        ?TEXT CAPS (row, startingcolumn, endingcolumn, attribute)
  958.                        ?var (row, startingcolumn, endingcolumn, attribute)
  959.  
  960.        INTKEYS ON      (default setting)
  961.        INTKEYS OFF
  962.        INTKEYS CLEAR
  963.  
  964.        The INTKEYS ON command allows the program to check for any defined
  965.        interrupt key presses between statements.  The INTKEYS OFF command
  966.        turns the interrupt key checking off (although it does NOT change
  967.        any of the interrupt key definitions).  The INTKEYS CLEAR command
  968.        clears all 16 of the interrupt key definitions, but does not affect
  969.        the ON/OFF status of interrupt key checking.
  970.  
  971.        ex: INTKEYS ON         'turns checking ON
  972.            INTKEYS OFF        'turns checking OFF
  973.            INTKEYS CLEAR      'clears all definitions-checking status unchanged 
  974.            INTKEYS CLEAR ON   'clears all definitions and turns checking ON
  975.            INTKEYS CLEAR OFF  'clears all definitions and turns checking OFF
  976.  
  977.     ** See the ON INTKEY command for more information. 
  978. --------------------------------------------------------------------------------
  979.        LEFT MOUSE key
  980.        CENTER MOUSE key
  981.        RIGHT MOUSE key
  982.  
  983.        These instructions will specify which keycode is sent to the program
  984.        when a mouse button is pressed.  The default is SPACE (code=32).
  985.  
  986.        e.g.  LEFT MOUSE ENTER \ RIGHT MOUSE ESC
  987.  
  988.        SPECIAL NOTE: When running an application, the mouse sensitivity can be
  989.        adjusted by pressing Shift and Ctrl at the same time.  The default
  990.        sensitivity is set for a 200 dpi mouse.
  991. ----------------------------------------------------------------------------
  992.        MEM PEEK offset var
  993.  
  994.        This instruction will look at the PC's lowest 64k memory segment
  995.        0000:offset and will place the value in the variable (var). This
  996.        is useful for checking keyboard shift status, video mode etc.
  997.        For example, MEM PEEK 1047 V1 would place the keyboard shift status
  998.        in variable V1 where the binary weight of each bit is as follows:
  999.           1 = right Shift pressed          16 = Scroll-Lock ON
  1000.           2 = left Shift pressed           32 = Num-Lock ON
  1001.           4 = Ctrl key pressed             64 = Caps-Lock ON
  1002.           8 = Alt key pressed             128 = Insert mode ON
  1003.  
  1004.        MOUSE ON       {or simply MOUSE}
  1005.        MOUSE OFF
  1006.  
  1007.        These instructions enable or disable the ability to allow the mouse 
  1008.        to move the cursor and/or simulate a keypress.
  1009. ----------------------------------------------------------------------------
  1010.        ON INTKEYn key GOSUB label
  1011.        ON INTKEYn key GOTO label
  1012.  
  1013.        where n can be 0 to 15 and key is a specified key code
  1014.  
  1015.        These instructions allow the programmer to specify up to 16 critical
  1016.        keys that the program should watch for.  The specified action is taken
  1017.        regardless of what the program was doing (like an interrupt).  An 
  1018.        example might include a system-wide help screen or exit function.
  1019.  
  1020.        NOTES:
  1021.        1. When an interrupt key is pressed, the current keyclick values
  1022.           (KEY,ROW CLICK and COLUMN CLICK) are NOT overwritten by the interrupt
  1023.           key's keyclick values.  You may use the IF CSR to access the current
  1024.           screen-cursor values.
  1025.        2. The interrupt keys are normally checked between each statement.
  1026.           If the NOCHK mode is selected, the only time that the interrupt
  1027.           keys are checked is when a WAIT or WAITKEY command is executed.
  1028.  
  1029.        e.g.  ON INTKEY0 CTRL C GOTO QUIT
  1030.              ON INTKEY15 F1 GOSUB HELP
  1031.              ∙
  1032.              ∙ (other statements)
  1033.              ∙
  1034.             :HELP
  1035.              ∙ 
  1036.              ∙ (other statements)
  1037.              ∙
  1038.              RET
  1039.              ∙
  1040.             :QUIT \ EXITC
  1041.  
  1042.         When using the GOSUB option, it is a good idea to SAVE the screen
  1043.         and then RESTORE it prior to executing a RETurn. The command
  1044.         ON INTKEYn NULL will effectively disable an interrupt key definition.
  1045.         It can be enabled again later.
  1046.  
  1047.      ** See the INTKEYS command for additional information.
  1048.  
  1049.        ON var GOTO label1,label2,label3,label4
  1050.        ON var GOSUB label1,label2,label3,label4
  1051.  
  1052.        These instructions will take the appropriate action (GOTO or GOSUB)
  1053.        based on the value of the variable (var).
  1054.  
  1055.        For example,
  1056.        ON V1 GOTO FIRST,SECOND,THIRD
  1057.        If the variable V1=1 then the program would GOTO FIRST
  1058.        If the variable V1=2 then the program would GOTO SECOND
  1059.        If the variable V1=3 then the program would GOTO THIRD etc.
  1060.        If the variable is equal to zero or the variable is greater than
  1061.        the number of labels, then program execution will resume at the
  1062.        statement following the (ON var GOTO) or (ON var GOSUB ).
  1063.        The ON GOSUB is similar but it places the return address (of the
  1064.        statement following the ON GOSUB) onto the stack.  This allows the
  1065.        subroutine's RETURN (or RET) statement to operate properly.
  1066.        The maximum number of labels per line is 63.
  1067. --------------------------------------------------------------------------------
  1068.        P+     (default)
  1069.        P-
  1070.  
  1071.        The P+ instruction enables the color attribute for printing, which means
  1072.        that all printing is done in the current foreground/background colors.
  1073.        The P- instruction disables the color attribute for printing, which means
  1074.        that all printing uses the colors (already on the screen) at the current
  1075.        print cursor location. The selected setting stays in effect until
  1076.        cancelled by the opposite instruction.
  1077.        example:  P+ \ ! "test"   'print using current colors
  1078.                  P- \ ! "1234"   'print using colors already on the screen
  1079. --------------------------------------------------------------------------------
  1080.        P@ row,column
  1081.  
  1082.        This instruction locates the print cursor at the specified row 
  1083.        (1 to 25) and column (1 to 80).  For example, P@12,40 would locate
  1084.        the print cursor at row 12 and column 40.  This determines where
  1085.        the next print statement will start.  see: PCSR LIM below
  1086. -------------------------------------------------------------------------------
  1087.        PCSR LIM (top_row , leftmost_column , bottom_row , rightmost_column)
  1088.        PCSR LIM
  1089.  
  1090.        The first form, with operands, sets the limits on the print cursor
  1091.        location and the second form, with no operands, restores the limits 
  1092.        to include the entire screen.  Note: This means that printing can only
  1093.        occur within the specified limits.
  1094.        ex: WINDOW (15,35,25,65) 32 \ PCSR LIM (15,35,25,65)
  1095.            'this would force the cursor to stay inside the window
  1096.            'upper-left (row=15,column=35) and lower-right (row=25,column=65)
  1097.  
  1098.        PEEK buffer (row,column) ASCII var
  1099.        PEEK buffer (row,column) ATTR var
  1100.        PEEK buffer (row,column) var var
  1101.  
  1102.        POKE buffer (row,column) ASCII val
  1103.        POKE buffer (row,column) ATTR val
  1104.        POKE buffer (row,column) val val
  1105.  
  1106.        These instructions will allow the program to read (PEEK) or write
  1107.        (POKE) from/to the specified buffer at the location (row,column).
  1108.        Using the ASCII keyword would involve only the character code while
  1109.        using the ATTR keyword would involve only the color attribute.  Using
  1110.        (var var) or (val val) would specify both the ASCII code and the color
  1111.        attribute would be used (in that order).      
  1112.  
  1113.        ex: PEEK 0 (25,80) V1 V2 would read the screen at (row=25,column=80)
  1114.                                 and would put its ASCII value in V1 while
  1115.                                 placing its color attribute value in V2.
  1116. ----------------------------------------------------------------------------
  1117.        PLAY "text..."
  1118.  
  1119.        This instruction 'plays' the specified musical commands through the
  1120.        PC's internal speaker.  A summary of PLAY commands is listed below.
  1121.  
  1122.       < or >  Up or down one octave
  1123.       A-G  Plays A, B, ..., G in current
  1124.            octave (+ = sharp, - = flat)
  1125.       Ln  Sets length of a note (L1 is
  1126.           whole note, L4 is quarter note,
  1127.           etc.)  n = 1-64
  1128.       ML  Each note plays full length
  1129.       MN  Each note plays 7/8 of length
  1130.       MS  Each note plays 3/4 of length
  1131.       Nn  Plays note n (n = 0-84, 0 is a
  1132.           rest)
  1133.       On  Sets current octave (n = 0-6)
  1134.       Pn  Pause for the duration of
  1135.           n quarternotes (n = 1-64)
  1136.       Tn  Sets number of quarter notes per
  1137.           minute (n = 32-255, 120 default
  1138.  
  1139.       e.g. PLAY "O3CDEFGAB"
  1140.       Note: The ShowText PLAY command does NOT allow the playing of background
  1141.       music, therefore your program will -halt- while the music plays!
  1142.       Please see the special note about the string $(buf,row,col,col) in the
  1143.       section labeled programming tricks and tips.
  1144. ----------------------------------------------------------------------------
  1145.        PORT IN port var
  1146.        This instruction reads values from the specified I/O port into the
  1147.        variable (var).  ex: PORT IN 512 V1  read port number 512 into V1
  1148.  
  1149.        PRINT "text........."
  1150.        prints the text at the current location of the print-cursor
  1151.  
  1152.        PRINT CHAR(val)
  1153.        prints the ASCII character whose ASCII code is specified in val.
  1154.  
  1155.        PRINT var,format
  1156.        print the specified variable according to the specified format
  1157.        (characters in format= 1 to 9  L  Z  O  Q)
  1158.        1 to 9 specifies the width of the field (printing 255 would use 3)
  1159.        L means left-justify (if L is not specified the default is right-justify)
  1160.        Z means to pad the field (left-side) with zeros when printing a small #.
  1161.        O or Q means to replace that (reprehensible) slashed-zero with the
  1162.               letter O.
  1163.        ex: PRINT V1,3Q would print V1 right-justified in a 3-column field with
  1164.                        all zeros replaced by the letter O.
  1165.  
  1166.        TTYPE "text......"
  1167.        is the same as print but it has a slight delay between characters
  1168.        like the old teletype machines. This only works for a text string.
  1169.  
  1170.        Note: If a semi-colon (;) is placed at the end of the line, it will
  1171.              leave the print cursor at that position rather than simulate
  1172.              a <cr><lf> (carriage∙return-line∙feed). e.g PRINT "ABC";
  1173.              This is true for all of the PRINT/TTYPE commands.
  1174.              Please see the special note about the string $(buf,row,col,col)
  1175.              in the section labeled programming tricks and tips.
  1176.              The exclamation mark (!) can be used in place of PRINT while (!!)
  1177.              can be used in place of TTYPE.   e.g.  ! "text"  or  !! "text"
  1178. ----------------------------------------------------------------------------
  1179.        PUSH valuelist         {numbers,variables,indexed variables,expressions}
  1180.        POP  variablelist      {only normal (non-indexed) variables allowed}
  1181.  
  1182.        These instructions PUSH/POP values on/off the variable stack. (Note
  1183.        that the variable stack is different from the instruction stack used
  1184.        by the GOSUB/RET/RST S instructions).  The variable list can be 
  1185.        specified in a number of ways. Some examples will show how it works.
  1186.  
  1187.        PUSH 1,V2,V3+1        PUSHes the number 1, variable V2 and 
  1188.                              expression V3+1 (evaluated) onto the stack.
  1189.  
  1190.        PUSH V1,V5:V7,V9:V12  is the same as PUSH V1,V5,V6,V7,V9,V10,V11,V12
  1191.                              and should be followed later in the program by:
  1192.        POP V12:V9,V7:V5,V1   because values are POPped off the variable stack
  1193.                              in the opposite order in which they were PUSHed
  1194.                              onto the stack.
  1195.  
  1196.        The colon (:) is used to specify a range of variables. Only normal
  1197.        variables can be used when the colon (:) is specified.
  1198.  
  1199.        These instructions allow subroutines to push variables onto the stack,
  1200.        then use them in any routines, then pop the original values back into
  1201.        the appropriate variables.  Be sure not to push too many variables onto
  1202.        the stack at any given time because the stack is only 1024 bytes long.
  1203.        If you PUSH too many values onto the stack, an error message will be
  1204.        generated.  If you try to POP a value off the stack when there are no
  1205.        values on the stack, the destination target variable will remain 
  1206.        unchanged and no error message will be given.
  1207.  
  1208.        RST KEYCLK  ( or  RST K)
  1209.  
  1210.        This instruction clears the entire 63 byte keyclick buffer and also
  1211.        clears the PC's keyboard buffer.  This allows the program to cancel
  1212.        any type-ahead before executing a particular routine.
  1213. ----------------------------------------------------------------------------
  1214.        RST STACK  ( or RST S)
  1215.  
  1216.        This instruction pops one (RETURN) value off the stack.  This allows
  1217.        a subroutine to return to a different address than the one which called
  1218.        it.  e.g.  RST STACK \ GOTO OTHER
  1219. ----------------------------------------------------------------------------
  1220.        RST T              reset timer number 0
  1221.        RST Tn             reset timer number n (n=0 to 15 or math expression)
  1222.        RST TS             reset all timerS
  1223.  
  1224.        This instruction resets the specified 16 bit-timer to zero.  The timers
  1225.        have a range of 0 to 3600 seconds and measure the time since the last
  1226.        RST Tn instruction was executed.
  1227.        example: RST TS    would reset ALL 16 timers to zero
  1228.                 RST T15   would reset timer number 15 to zero
  1229.                 RST T%i   would reset timer number %i to zero
  1230. ----------------------------------------------------------------------------
  1231.        RESTART
  1232.  
  1233.        This instruction simply restarts the current program with all variables
  1234.        reset to zero.
  1235. ----------------------------------------------------------------------------
  1236.        SAVE
  1237.        Saves the current visible screen in the special buffer area (buffer 66).
  1238.  
  1239.        RESTORE fade 
  1240.        Restores the screen from the special buffer area (with an optional fade).
  1241.  
  1242.        Note: The SAVE/RESTORE combination not only saves and restores the
  1243.        screen itself, but also saves and restores nearly ALL screen parameters
  1244.        such as screen-cursor (location, limits, scan-lines, ON/OFF state),
  1245.        print-colors, print-cursor location and limits, P+/P- status etc.
  1246.        Note: The following are some of the parameters that are NOT preserved:
  1247.              ARROWS ON/OFF state, CHK/NOCHK state, INTKEYS ON/OFF state,
  1248.              ON INTKEY definitions and VIRTUAL state.
  1249.        This is useful before and after a (WINDOW / user input) routine.
  1250.        ex: SAVE\CLS\RESTORE 1 'save-screen,clear-screen,restore-screen w/fade=1
  1251. -------------------------------------------------------------------------------
  1252.        SCREENSAVER val
  1253.  
  1254.        This instruction implements a screensaver function which is invoked
  1255.        when no key/mouse buttons are pressed for the specified time (in
  1256.        minutes).  The screensaver is disabled if the value (val) is zero.
  1257.        ex: SCREENSAVER 1 'would active screen-saver after 1 minute of inactivity
  1258. -------------------------------------------------------------------------------
  1259.        SCROLL UP (row1,col1,row2,col2)
  1260.        SCROLL DOWN (row1,col1,row2,col2)
  1261.  
  1262.        These instructions will cause the text inside the block at
  1263.        (upper-left=row1,col1  lower-right=row2,col2) to scroll one line
  1264.        in the specified direction.  The resultant blank line will be shown in
  1265.        the default foreground/background color.
  1266.        ex: SCROLL UP (1,1,25,80) would scroll entire screen up
  1267.  
  1268.        SELECT CASE test_expression
  1269.           ∙∙∙
  1270.           ∙∙∙statements_block1
  1271.           ∙∙∙
  1272.        CASE case_expression{,case_expression...}
  1273.           ∙∙∙
  1274.           ∙∙∙statements_block2
  1275.           ∙∙∙
  1276.        CASE ELSE
  1277.           ∙∙∙
  1278.           ∙∙∙statements_block3
  1279.           ∙∙∙
  1280.        END SELECT
  1281.  
  1282.        This group of instructions will allow your program to execute specific
  1283.        blocks of code depending upon the relationship between the 
  1284.        test_expression and the case_expression(s).  The SELECT CASE statement
  1285.        establishes the value against which all of the case_expressions are
  1286.        compared.  The test_expression and case_expression(s) can be any
  1287.        mathematical expressions.  In addition, the case_expression can also
  1288.        be in the form  value1 TO value2 (e.g. 4 TO 5 )(note: value1 must be 
  1289.        less than value2).  It can also be in the form  {relational_operator}
  1290.        value (e.g. <5).  More than one case expression can be placed on a
  1291.        line by separating them with a comma.  The CASE ELSE statement is used
  1292.        to handle any conditions not covered by previous CASE statements.  Note
  1293.        that the CASE ELSE statement is optional.
  1294.  
  1295.        Example 1
  1296.        %j=4 \ for %i=1 to 10
  1297.        SELECT CASE %i  'could also have been a mathematical expression
  1298.             print "statements before first case are always executed"
  1299.        CASE 1
  1300.             print "it was a 1"
  1301.        CASE 2 TO 3,>=9
  1302.             print "it was either 2,3,9 or 10"
  1303.        CASE %j+2,%j*2
  1304.             print "it was a 6 or an 8"
  1305.        CASE ELSE
  1306.             print "if all else fails it was 4,5 or 7"
  1307.        END SELECT       
  1308.  
  1309.        Example 2 (note that CASE ELSE is not used)
  1310.        for %i=1 to 10
  1311.        SELECT CASE %i AND 1
  1312.        print %i,3q;
  1313.        CASE 0 \ print " is an even number"
  1314.        CASE 1 \ print " is an odd number"
  1315.        END SELECT
  1316.  
  1317.        System Variables - (  be sure to use the square brackets  [ ]   )
  1318.        [info] returns the specified information where [info] can be:
  1319.  
  1320.        [RANDOM num1 TO num2]
  1321.        returns a random number within the range num1 to num2.
  1322.        Note: Num1 and Num2 are numbers (0 to 255) and cannot be variables.
  1323.  
  1324.        [X]     (the EXTRA variable used in most arithmetic operations)
  1325.        [OVR]   (the OVERFLOW variable  =255 if overflow    =0 if no overflow)
  1326.                 this variable can only be reset to 0 by reading it 
  1327.                 e.g.  if [OVR] quit
  1328.               
  1329.        -----------------Keyclick Values----------------------------------------
  1330.        [K]     ( most recent keyclick KEY value)
  1331.        [KC]    ( most recent keyclick KEY value (capitalized) )
  1332.        [.R]    ( most recent keyclick row value)
  1333.        [.C]    ( most recent keyclick column value)
  1334.        [.AS]   ( ASCII value of the character located on-the-screen
  1335.                 at the most recent keyclick row,column coordinates)
  1336.        [.AT]   ( ATTRIBUTE value of the character located
  1337.                 on-the-screen at the most recent keyclick row,col coordinates)
  1338.        [.F]    ( foreground color value of the character located
  1339.                 on-the-screen at the most recent keyclick row,col coordinates)
  1340.        [.B]    ( background color value of the character located
  1341.                 on-the-screen at the most recent keyclick row,col coordinates)
  1342.                 --note-- [.AS] [.AT] [.F] [.B] are always determined from
  1343.                          the visible screen regardless of the VIRTUAL setting.
  1344.  
  1345.        -----------------Screen Cursor Values-----------------------------------
  1346.        [CV]    ( cursor visibility status  0=Cursor OFF and 255=cursor ON)
  1347.        [CSR]   ( same as [CV] )
  1348.        [R.]    ( row on which the cursor currently resides)
  1349.        [C.]    ( column on which the cursor currently resides)
  1350.        [AS.]   ( ASCII value of the character located on-the-screen
  1351.                 at the current cursor row,column coordinates)
  1352.        [AT.]   ( ATTRIBUTE value of the character located
  1353.                 on-the-screen at the current cursor row,col coordinates)
  1354.        [F.]    ( foreground color value of the character located
  1355.                 on-the-screen at the current cursor row,col coordinates)
  1356.        [B.]    ( background color value of the character located
  1357.                 on-the-screen at the current cursor row,col coordinates)
  1358.                 --note-- [AS.] [AT.] [F.] [B.] are always determined from
  1359.                          the visible screen regardless of the VIRTUAL setting.
  1360.        [-R.]     minimum cursor row value────┐ 
  1361.        [+R.]     maximum cursor row value    ├─set by the last
  1362.        [-C.]     minimum cursor column value │ CSR LIM  
  1363.        [+C.]     maximum cursor column value─┘ command executed
  1364.              
  1365.        -----------------Print Cursor Values------------------------------------
  1366.        [R;]    ( row on which the print-cursor currently resides)
  1367.        [C;]    ( column on which the print-cursor currently resides)
  1368.        [AT;]   ( current foreground/background attribute byte) for printing
  1369.        [F;]    ( current foreground color 0 to 31) for printing
  1370.        [B;]    ( current background color 0 to 7)  for printing
  1371.        [-R;]     minimum print cursor row value────┐ 
  1372.        [+R;]     maximum print cursor row value    ├─set by the last
  1373.        [-C;]     minimum print cursor column value │ PCSR LIM  
  1374.        [+C;]     maximum print cursor column value─┘ command executed
  1375.  
  1376.        System variables - continued
  1377.  
  1378.        [ARROWS] returns  0 if arrows are off,   255 if arrows are on
  1379.        [CHK]    returns  0 if NOCHK,  255 if CHK
  1380.        [INTK]   returns  0 if INTKEYS are off,  255 if INTKEYS are on 
  1381.        [BIOSn]  returns the value of the byte located at (decimal) offset n from
  1382.                 the start of the BIOS data area (in low memory at 0040:0000h)
  1383.                 (see the appendix for more information about this area)
  1384.        [POP]    pops a value of the variable stack and uses it in expression
  1385.        [VIRT]   returns the current virtual buffer number (last set by VIRTUAL)
  1386.                 (i.e. where CLS, PRINT, COPY (%buffer,0) etc. are performed)
  1387.                 if =0 then printing goes to visible screen (virtual mode is off)
  1388.                 if >0 then printing goes to specified buffer (virtual mode is on)
  1389.  
  1390.        [M?]    255 if mouse present    0 if no mouse was found
  1391.        [MB]    255 if any mouse button pressed         0 otherwise
  1392.        [ML]    255 if left mouse button pressed        0 otherwise
  1393.        [MR]    255 if right mouse button pressed       0 otherwise
  1394.        [MC]    255 if center mouse button pressed      0 otherwise
  1395.  
  1396.        [JAX]   joystick A analog (X) value (0 to 255)
  1397.        [JAY]   joystick A analog (Y) value (0 to 255)
  1398.        [JBX]   joystick B analog (X) value (0 to 255)
  1399.        [JBY]   joystick B analog (Y) value (0 to 255)
  1400.        [JAF]   255 if joystick A fire button pressed ( 0 otherwise)
  1401.        [JAB]   255 if joystick A base button pressed ( 0 otherwise)
  1402.        [JBF]   255 if joystick B fire button pressed ( 0 otherwise)
  1403.        [JBB]   255 if joystick B base button pressed ( 0 otherwise)
  1404.  
  1405.        [Tn]    (returns the least significant 8 bits of the specified 16 bit
  1406.                timer's value while the most significant 8 bits are placed in
  1407.                the EXTRA variable)  (n=0 to 15)  e.g. V2=[T0] \ V3=[X]
  1408.                (Note: "n" can also be a math expression   e.g. [T%i+1] 
  1409.                       These values are in clock-ticks and are NOT in seconds
  1410.                       There are approximately 18.2 clock-ticks in one second.)
  1411.        [RND]   with no arguments - returns a random number between 0 and 255
  1412.        [STK]   ( instruction stack pointer i.e. level of subroutine)
  1413.        [ERL]   ( current DOS ERRORLEVEL value)
  1414.        [DIR]   returns the state of the internal directory pointer
  1415.                0=no files in directory
  1416.                1=now pointing to first directory entry (i.e. after DIRTOP cmd)
  1417.                2=now pointing to last  directory entry (i.e. after DIRBOT cmd)
  1418.                3=pointing to first and last entry (i.e. only 1 file in library)
  1419.                4=now pointing to somewhere between first and last entries
  1420.  
  1421.      ┌────────────────────────────────────────────────────────────────────┐
  1422.      │   The following values are available on AT class PCs with CMOS RAM │
  1423.      │ [YR]   ( tens of years e.g. 1995 would return 95)                  │
  1424.      │ [MON]  ( current month 1 to 12)                                    │
  1425.      │ [DAY]  ( current day 1 to 31)                                      │
  1426.      │ [HR]   ( hour in 24 hr format eg. 1 pm = 13)                       │
  1427.      │ [MIN]  ( minutes e.g. 12:34 = 34 )                                 │
  1428.      │ [SEC]  ( seconds eg. 12:34:56 = 56 )                               │
  1429.      └────────────────────────────────────────────────────────────────────┘
  1430.  
  1431.        System variables - continued
  1432.  
  1433.        [.row1:column1:row2:column2] is 225 if last click was in "box"
  1434.                                     is 0 if not
  1435.  
  1436.        [row1:column1:row2:column2.] is 225 if cursor is currently in "box"
  1437.                                     is 0 if not
  1438.  
  1439.        [AS:buf:row:col]  returns the AScii value of the character located
  1440.                          in buffer "buf" at the specified row and column
  1441.    
  1442.        [AT:buf:row:col]  returns the ATtribute-byte value of the character
  1443.                          located in buffer "buf" at the specified row and column
  1444.    
  1445.        [F:buf:row:col]   returns the foreground color (0 to 31) of the character
  1446.                          located in buffer "buf" at the specified row and column
  1447.    
  1448.        [B:buf:row:col]   returns the background color (0 to 7) of the character
  1449.                          located in buffer "buf" at the specified row and column
  1450.    
  1451.        [FB:fg:bg] returns the corresponding attribute value of the specified
  1452.                   foreground and background colors. 
  1453.                   e.g. [FB:31:1] uses 31=(blinking bright white foreground) and
  1454.                                        1=(blue background)
  1455.                   returns 159 (see ATTR and COLOR commands for values)
  1456.                   The commands COLOR 31,1 and ATTR [FB:31:1] are equivalent.
  1457.  
  1458.        [IR:lowval:testval:highval] returns 255 if testval is in specified range
  1459.         └─(I)n-(R)ange test        returns   0 if not in range
  1460.  
  1461.        [;lowval:testval:highval] returns a value within the specified range.
  1462.                    │             ┌─────────────────────────────────────────┐
  1463.                    └─────────────┤ if testval<lowval  then returns lowval  │
  1464.                                  │ if testval>highval then returns highval │
  1465.                                  │ otherwise returns testval as-is         │
  1466.                                  └─────────────────────────────────────────┘
  1467.                                  Note: All 3 items -must- be specified, because
  1468.                                  no defaults are assumed.
  1469.           
  1470.        [TM:lowval:timer#:highval] checks to see if specified timer is in-range
  1471.         returns 255 if specified timer(in ticks) is InRange , 0 if not
  1472.         e.g [TM:25:7:35] checks the ticks-value of timer number 7 to see if it
  1473.         is between 25 and 35 inclusive.
  1474.  
  1475.    >>> Note the use of colons (:) instead of commas (,) in some of these
  1476.        system variables. This makes parsing of the command more straightforward.
  1477.  
  1478.        ex: V0=[K] places the most recent keyclick value into V0
  1479.  
  1480.        var=val
  1481.        var++          (increment var by 1)  ex: V7++ is the same as V7=V7+1
  1482.        var--          (decrement var by 1)  ex: V7-- is the same as V7=V7-1
  1483.        var=val^val    (exponentiation)
  1484.        var=val*val    (multiplication)
  1485.        var=val/val    (division)
  1486.        var=val~val    (modulo division - returns the remainder of val/val)
  1487.        var=val+val    (addition)
  1488.        var=val-val    (subtraction)
  1489.        var=val<val    (less than)----------------always 0(false) or 255(true)
  1490.        var=val=val    (equal to)-----------------always 0(false) or 255(true)
  1491.        var=val>val    (greater than)-------------always 0(false) or 255(true)
  1492.        var=val<=val   (less than or equal to)----always 0(false) or 255(true)
  1493.        var=val<>val   (not equal to)-------------always 0(false) or 255(true)
  1494.        var=val>=val   (greater than or equal to)-always 0(false) or 255(true)
  1495.        var=`val       (logical NOT)     note:symbol is ascii 96
  1496.        var=val&val    (logical AND)
  1497.        var=val@val    (logical OR)──────┬──alternate OR symbols
  1498.        var=val|val    (logical OR)──────┘
  1499.        var=val#val    (logical XOR)
  1500.  
  1501.        var is a variable (V0 to V255) or an indexed variable (VV0 to VV255).
  1502.        val can also be a variable, an indexed variable or a number (0 to 255).
  1503.        A variable is similar to an array element. V0 to V255 is similar to
  1504.        V(0) to V(255) in some other languages.  An indexed variable uses the
  1505.        contents of another variable as an index. VV0 to VV255 is similar to
  1506.        V(V(0)) to V(V(255)).  There are still only 256 variables in the 
  1507.        system.  Indexing only allows more options for the programmer. 
  1508.        These instructions perform the specified (integer) math operation.
  1509.        The variables have unsigned 8-bit values which means that they may
  1510.        only contain numbers from 0 to 255.  The AND,OR and XOR are bitwise
  1511.        logic instructions.  The EXTRA variable [X] is used to hold the overflow
  1512.        and underflow of the math operations.  The overflow variable [OVR] is
  1513.        set to 255 if ANY math over/underflow occurs.  OVR is reset to zero 
  1514.        ONLY when it is read.
  1515.  
  1516.        Notes:
  1517.        These instructions can be embedded in normal instructions,
  1518.        e.g.  %A = (%B + 45) * ((%C + 1) / 4)
  1519.        however you must remember that there are NO negative values in ShowText.
  1520.        This means that  %A = 3-2  is NOT the same as  %A= -2+3 .
  1521.        The EXTRA variable's value is set by the LAST math operation performed.
  1522.        The order of execution of mathematical operations is:
  1523.            1st - parentheses         ( )
  1524.            2nd - exponentiation       ^
  1525.            3rd - multiplication       *
  1526.            4th - division and modulo  /   ~
  1527.            5th - add  subtract        +   -
  1528.            6th - relational           <   =   >   <=   <>   >=
  1529.            7th - logical NOT          `
  1530.            8th - logical              &   @   |   #
  1531.  
  1532.        VIRTUAL val
  1533.  
  1534.        Sets the address used by buffer 0 to the specified buffer's address.
  1535.        For example, VIRTUAL 2 means that CLS, PRINT, COPY(4,0) etc. would
  1536.        perform their actions on buffer 2 instead of on the visible screen.
  1537.        VIRTUAL 0 would change the address of buffer 0 to the visible screen.
  1538. ----------------------------------------------------------------------------
  1539.        WAIT seconds             {or WT}
  1540.  
  1541.        where seconds is 0 to 3600.8 seconds and represents how long the
  1542.        program should wait. ex: WAIT 2 would pause program for two seconds
  1543. ----------------------------------------------------------------------------
  1544.        WAITKEY seconds          {or WK seconds}
  1545.        WAITKEY seconds,label    {or WK seconds,label}
  1546.        WAITKEY                  {or WK}
  1547.  
  1548.        where seconds is 0 to 3600 seconds and represents how long the
  1549.        program should wait for a key/mouse button press.
  1550.        ex: WAITKEY 10,TOOLATE would retrieve a keyclick pressed within
  1551.            ten seconds and then continue execution at the next statement,
  1552.            otherwise if no key/mouse is pressed within ten seconds a
  1553.            GOTO TOOLATE would be executed.
  1554.  
  1555.        When the user presses a key (or a mouse button), the ShowText system
  1556.        generates three things: a KEY (0 to 255) value , a ROW CLICK
  1557.        (row 1 to 25) value and a COLUMN CLICK (column 1 to 80) value.  These
  1558.        values are placed in a 63 byte circular (first-in-first-out) buffer.
  1559.        The O-N-L-Y way to make these values available to the program is to
  1560.        execute a WAITKEY command.  The WAITKEY command retrieves the next
  1561.        character in the keyclick buffer.  If no user input is waiting then
  1562.        KEY=0 (NULL), ROW CLICK=0 and COLUMN CLICK=0. 
  1563.  
  1564.        The first form of the instruction will cause execution to continue at
  1565.        the statement following the WAITKEY statement whenever a key/mouse
  1566.        button is pressed or when the time interval has expired.
  1567.        The second form of the instruction will cause execution to continue at
  1568.        the statement following the WAITKEY statement only if a key/mouse button
  1569.        is pressed.  If the time interval expires before a key/mouse button is
  1570.        pressed, execution continues at the specified label (like GOTO label).
  1571.        The third form waits indefinitely for a key/mouse-press then continues.
  1572.  
  1573.        WHILE condition
  1574.        ∙∙∙
  1575.        ∙∙∙statements∙∙∙
  1576.        ∙∙∙
  1577.        WEND
  1578.  
  1579.        The WHILE-loop is performed as long as the condition is true.  For
  1580.        example, the following program will print the numbers 1 through 5.
  1581.  
  1582.          %I=1
  1583.          WHILE %I<=5
  1584.          PRINT %I,3Q
  1585.          %I++
  1586.          WEND
  1587.  
  1588.        Special Note: The GOWEND instruction can be used to perform a GOTO to
  1589.        the next WEND instruction as if a label was assigned to it. The
  1590.        EXITWHILE/XWHILE instructions can be used to perform a GOTO to the
  1591.        instruction immediately following the next WEND instruction.  These
  1592.        instructions will properly handle nested WHILE/WEND loops, so that a
  1593.        GOWEND (or EXITWHILE or XWHILE) in an outer loop will seek the
  1594.        appropriate WEND instruction.
  1595. ----------------------------------------------------------------------------
  1596.        WINDOW (row1,col1,row2,col2) windowtype
  1597.        WINDOW (row1,col1,row2,col2) windowtype,attribute
  1598.  
  1599.        The first instruction will draw a window (with current colors) between
  1600.        the upper-left (row1,col1) and the lower-right (row2,col2) positions
  1601.        on the screen. The interior of the window is painted with current colors.
  1602.        Text may then be inserted inside the window with the print statement etc.
  1603.        The windowtype value may be a number or variable.
  1604.            window       ┌───┐   ╒═══╕   ╓───╖    ╔═══╗
  1605.            types:       │100│   │101│   ║102║    ║103║    Type 104=MARQUEE
  1606.                         └───┘   ╘═══╛   ╙───╜    ╚═══╝
  1607.        ex: WINDOW (1,1,25,80) 100 places single-line window around entire screen
  1608.        NOTE: Type 104 generates a "marquee" around the specified box in low
  1609.        intensity current colors.  This type of window differs from all others
  1610.        because the inside of the box is "clear" (i.e. it is not painted over
  1611.        by this instruction and can be followed by a BFILL instruction).
  1612.        Values outside the range of 100 to 104 will place the ASCII character
  1613.        code (val) around the perimeter of the window.  See TIPS/TRICKS section.
  1614.        The second form allows an optional attribute value. See ATTR command.
  1615.  
  1616.        XBLOAD "filename.ext"
  1617.        XBSAVE "filename.ext"
  1618.  
  1619.        These two instructions ( XBLOAD - e<X>ternal <B>lock <LOAD> and
  1620.        XBSAVE - e<X>ternal <B>lock <SAVE> ) allow your program to
  1621.        load/save entire blocks of buffers, variables, and screen settings.
  1622.  
  1623.        The XBSAVE instruction requires your program to push various
  1624.        data items onto the variable-stack prior to executing the XBSAVE itself.
  1625.        A short example will show how this is done. Suppose you wish to store
  1626.        3 buffers (17,29 & 45) in an external file; here is how this can be done:
  1627.          PUSH 17 ───┐
  1628.          PUSH 29    ├─push the buffer number of each buffer to save
  1629.          PUSH 45 ───┘
  1630.          PUSH 3 ──────push the total number of buffers to save
  1631.          PUSH 0 ──────last of all, push the MODE onto the stack 
  1632.          XBSAVE "TEMPFILE.DAT" ────store the buffers in file: TEMPFILE.DAT
  1633.  
  1634.        The MODE value is the last item pushed onto the variable-stack, and
  1635.        has the following value:
  1636.  
  1637.             MODE in         MODE in       MODE
  1638.          ---binary------  --decimal--  ---function----------------------------
  1639.          0 0 0 0 0 0 0 0       0       do not store variables or screen-status
  1640.          0 0 0 0 0 0 0 1       1       store variables
  1641.          0 0 0 0 0 0 1 0       2       store screen-status
  1642.          0 0 0 0 0 0 1 1       3       store variables and screen-status
  1643.                      │ └───if 1 then store ALL variables (V0 to V255) in file
  1644.                      └─────if 1 then store screen-status in file
  1645.        Note: The specified buffers are always stored, regardless of MODE value.
  1646.  
  1647.      >>Special care must be used in saving and reloading the variables.
  1648.        When the compiler encounters an alias-name (e.g. %TEMP) that has not been
  1649.        referenced before, it looks at the alias list until it finds a variable
  1650.        (V0 to V255) that has not been aliased. The alias-name is then assigned
  1651.        to this unaliased variable, and the alias table is updated so that the
  1652.        next time this alias-name is encountered, it will know what variable to
  1653.        replace it with. When the XBSAVE instruction is told to save the 
  1654.        variables, it saves ALL of them (V0 to V255) without saving the aliases
  1655.        that were assigned to them. Therefore, whenever you plan to use the
  1656.        XBSAVE to save the variables, you M-U-S-T use the ALIAS command (at the
  1657.        beginning of the program) to explicitly assign critical alias names.
  1658.        This must be done in the program that saves the variables and also in the
  1659.        one that reloads them.  This allows proper alignment of alias-names and
  1660.        variables after the XBLOAD is executed. You can use the PUSH/POP
  1661.        instructions to preserve and restore the non-critical variables, so that
  1662.        the XBSAVE/XBLOAD does not overwrite local or auto-aliased variables.
  1663.      >>The screen-status values that are currently capable of being saved, and
  1664.        then restored, are: screen-cursor (location, limits, scan-lines, ON/OFF
  1665.        state), print-colors, print-cursor (location, limits, P+/P- status).
  1666.        The following are some of the parameters that are NOT preserved:
  1667.        ARROWS ON/OFF state, CHK/NOCHK state, INTKEYS ON/OFF state, ON INTKEY
  1668.        definitions and VIRTUAL state. All things considered, avoid storing
  1669.        variables or screen-status unless it is absolutely necessary.
  1670.  
  1671.        The XBLOAD command does not require any setup prior to execution, because
  1672.        all data is restored from the file just as it was written. The EXTRA
  1673.        system variable [x] is set to 255 if an error occurred or is reset to
  1674.        zero if no error occurred (in opening the specified disk file).
  1675.  
  1676.  
  1677.        XFLOAD "filename.ext"
  1678.        XFSAVE "filename.ext"
  1679.  
  1680.        These two instructions ( XFLOAD - e<X>ternal <F>ile <LOAD> and
  1681.        XFSAVE - e<X>ternal <F>ile <SAVE> ) allow your program to
  1682.        load-screen-from/save-screen-to external files.  These files are always
  1683.        screen images like the .STF file format.  The extension MUST be specified
  1684.        with these instructions, because there is no assumed default extension.
  1685.        These files are NOT imbedded into the .EXE at compile time as the
  1686.        files used with the COPY command are.  The screen (buffer 0) is the
  1687.        default source/destination, but you can use the VIRTUAL command to
  1688.        temporarily point to another buffer as the source for XFSAVE or the
  1689.        destination for XFLOAD.  The EXTRA system variable is set to 255 if an
  1690.        error occurred or is reset to zero if no error occurred (in opening the
  1691.        specified disk file).
  1692.     >>>Note: All ASCII zero and ASCII 255 characters, on the screen
  1693.        (or virtual screen), are converted to ASCII 32 (space) characters (in the
  1694.        output file) when the XFSAVE instruction is called.
  1695.     >>>Note: Do NOT use buffer number 65 as the virtual screen, when using the
  1696.        XFSAVE/XFLOAD instructions, because it is a reserved area used to process
  1697.        these two instructions.
  1698.        Examples:
  1699.        XFSAVE "TEMP.STF"   'saves screen (or virtual screen) to TEMP.STF
  1700.        XFLOAD "TEMP.STF"   'loads screen (or virtual screen) from TEMP.STF
  1701.   
  1702.        If you want to save/load to a screen (%buffer) other than the visible
  1703.        screen and you don't want to alter the virtual setting, then do this:
  1704.        PUSH [VIRT] \ VIRT %buffer \ XFSAVE "TEMP.STF" \ VIRT [POP]
  1705.        PUSH [VIRT] \ VIRT %buffer \ XFLOAD "TEMP.STF" \ VIRT [POP]
  1706.  
  1707.        Compiler Directives
  1708. --------------------------------------------------------------------------------
  1709.        $BUFFERS nn        {where nn=1 to 63}
  1710.  
  1711.        This compiler directive specifies the number of internal screen buffers
  1712.        to allocate when the compiled application is started. The default is 63.
  1713.        Specifying a smaller number of buffers will use less memory. Note that
  1714.        this directive can only be used once in a program. Unused buffers are
  1715.        mapped to the view-screen memory area. The minimum is 1 internal buffer.
  1716.        Special buffers (64 to 66) and (67 to 73) are still valid. For example,
  1717.        $BUFFERS 3  'means that internal buffers 1,2 and 3 are allocated
  1718.                    'normally; buffers 4 through 63 are mapped to the view-screen
  1719. --------------------------------------------------------------------------------
  1720.        $DOS command
  1721.  
  1722.        This compiler directive SHELLs to DOS, executes the command, then returns
  1723.        to the compiler to finish compiling the remainder of the program.
  1724.        Note: This is a compiler directive and NOT a programming instruction.
  1725.        Ex: $DOS dir *.*
  1726. --------------------------------------------------------------------------------
  1727.        $LIB ADD filespec
  1728.        $LIB ADD filespec1,filespec2,...,...,filespecN
  1729.  
  1730.        The COPY(sourcefile,destinationbuffer)fade command automatically adds the
  1731.        specified sourcefile.STF to the internal library.
  1732.        The $LIB ADD directive was added to aid in the use of the 
  1733.        COPY ( $(bfr,row,col1,col2), dest)fade command, because this form of
  1734.        the COPY command performs a filename search on the internal library
  1735.        directory.  The $LIB ADD directive is used to make sure that all needed
  1736.        files are added to the internal library.
  1737.        The $LIB ADD directive will add all files (matching the filespec(s)
  1738.        in the current directory) to the internal library.  The default (and
  1739.        only) allowable extension is .STF.  Note that ALL files must be in
  1740.        the CURRENT directory.  NO drives:\directories can be specified!
  1741.        Note: See the $LIB DIR directive to find out how to override the default
  1742.              (current) directory used to store .STF files.
  1743.        Ex: $LIB ADD *.STF
  1744.            'adds all .STF files in the current directory
  1745. ----------------------------------------------------------------------------
  1746.        $LIB DIR "directoryname"
  1747.  
  1748.        This optional directive changes the directory that is used to access the
  1749.        .STF files. It should only be done once and it can only be done BEFORE
  1750.        any .STF files are added to the internal library. Note that the 
  1751.        double-quotes (") MUST be used because the backslash (\) is normally
  1752.        used to start a new program line.  
  1753.        Ex: $LIB DIR "\TEMP"
  1754.            'followed by
  1755.            $LIB ADD *.STF
  1756.            'would load all .STF files in the \TEMP directory (i.e. \TEMP\*.STF)
  1757.  
  1758.                        SPECIAL SHORTCUT PREFIX COMMANDS
  1759.               ┌───────────────┬───────────────┬───────────────┐
  1760.               │       +       │       -       │       .       │
  1761.        ┌──────┼───────────────┼───────────────┼───────────────┤
  1762.        │  a   │ ARROWS ON     │ ARROWS OFF    │ ARROWS ON     │
  1763.        ├──────┼───────────────┼───────────────┼───────────────┤
  1764.        │  c   │ CSR ON        │ CSR OFF       │ CSR ON        │
  1765.        ├──────┼───────────────┼───────────────┼───────────────┤
  1766.        │  i   │ INTKEYS ON    │ INTKEYS OFF   │ INTKEYS CLEAR │
  1767.        ├──────┼───────────────┼───────────────┼───────────────┤
  1768.        │  k   │ CHK           │ CHK OFF       │ RST K         │
  1769.        ├──────┼───────────────┼───────────────┼───────────────┤
  1770.        │  m   │ MOUSE ON      │ MOUSE OFF     │ MOUSE ON      │
  1771.        ├──────┼───────────────┼───────────────┼───────────────┤
  1772.        │  p   │ P+            │ P-            │ P+            │
  1773.        ├──────┼───────────────┼───────────────┼───────────────┤
  1774.        │  s   │ RST S         │ RST S         │ RST S         │
  1775.        ├──────┼───────────────┼───────────────┼───────────────┤
  1776.        │ t??  │ RST T??       │ RST T??       │ RST T??       │
  1777.        ├──────┼───────────────┼───────────────┼───────────────┤
  1778.        │ v??? │ V???++        │ V???--        │ V???=0        │
  1779.        ├──────┼───────────────┼───────────────┼───────────────┤
  1780.        │  x   │ C@[R.],[C.]+1 │ C@[R.],[C.]-1 │ C@[R.],1      │
  1781.        ├──────┼───────────────┼───────────────┼───────────────┤
  1782.        │  y   │ C@[R.]+1,[C.] │ C@[R.]-1,[C.] │ C@1,[C.]      │
  1783.        └──────┴───────────────┴───────────────┴───────────────┘
  1784.  
  1785. The ShowText programming language supports special shortcut commands which
  1786. are prefixed by (+), (-) or (.). Several of these commands can be placed in
  1787. the same program statement. The table above shows the action taken when each
  1788. letter is preceded by one of the three prefixes. Note that the variables
  1789. (V???) must be normal (non-indexed) variables. It was necessary to use (k)
  1790. to turn keyboard-checking on and off (CHK/NOCHK) because the letter (c) was
  1791. used for turning the cursor on and off (CSR ON/CSR OFF). The letters (x) and 
  1792. (y) are used to move the screen cursor (x=column and y=row).
  1793.  
  1794. Example:  .V1V2+V3-V4V5 would be equivalent to:
  1795.                         V1=0 \ V2=0 \ V3++ \ V4-- \ V5--
  1796.  
  1797.           +ckt12v123    would be equivalent to:
  1798.                         CSR ON \ CHK \ RST T12 \ V123++
  1799.  
  1800.           -mpst12v234   would be equivalent to:
  1801.                         MOUSE OFF \ P- \ RST S \ RST T12 \ V234--
  1802.  
  1803.           .it12v123xy   would be equivalent to:
  1804.                         INTKEYS CLEAR \ RST T12 \ V123=0 \ C@[R.],1 \ C@1,[C.]
  1805.  
  1806.           .xy           would be equivalent to:
  1807.                         C@1,1
  1808.  
  1809.        NUMERIC KEYCODE VALUES RETURNED BY THE   var=[K]   COMMAND
  1810.  
  1811.             ┌─────┬─────┬─────┬─────┐             ┌─────┬─────┬─────┬─────┐
  1812.        key  │     │SHIFT│ CTRL│ ALT │        key  │     │SHIFT│ CTRL│ ALT │
  1813.     ┌───────┼─────┼─────┼─────┼─────┤     ┌───────┼─────┼─────┼─────┼─────┤
  1814.     │   A   │  65 │  97 │   1 │ 158 │     │  ESC  │  27 │  27 │  27 │  -  │
  1815.     │   B   │  66 │  98 │   2 │ 176 │     │ BKSP  │   8 │   8 │ 127 │  -  │
  1816.     │   C   │  67 │  99 │   3 │ 174 │     │  TAB  │   9 │ 143 │  -  │  -  │
  1817.     │   D   │  68 │ 100 │   4 │ 160 │     │ SPACE │  32 │  32 │  32 │  32 │
  1818.     │   E   │  69 │ 101 │   5 │ 146 │     │ ENTER │  13 │  13 │  10 │  -  │
  1819.     │   F   │  70 │ 102 │   6 │ 161 │     │  F1   │ 187 │ 212 │ 222 │ 232 │
  1820.     │   G   │  71 │ 103 │   7 │ 162 │     │  F2   │ 188 │ 213 │ 223 │ 233 │
  1821.     │   H   │  72 │ 104 │   8 │ 163 │     │  F3   │ 189 │ 214 │ 224 │ 234 │
  1822.     │   I   │  73 │ 105 │   9 │ 151 │     │  F4   │ 190 │ 215 │ 225 │ 235 │
  1823.     │   J   │  74 │ 106 │  10 │ 164 │     │  F5   │ 191 │ 216 │ 226 │ 236 │
  1824.     │   K   │  75 │ 107 │  11 │ 165 │     │  F6   │ 192 │ 217 │ 227 │ 237 │
  1825.     │   L   │  76 │ 108 │  12 │ 166 │     │  F7   │ 193 │ 218 │ 228 │ 238 │
  1826.     │   M   │  77 │ 109 │  13 │ 178 │     │  F8   │ 194 │ 219 │ 229 │ 239 │
  1827.     │   N   │  78 │ 110 │  14 │ 177 │     │  F9   │ 195 │ 220 │ 230 │ 240 │
  1828.     │   O   │  79 │ 111 │  15 │ 152 │     │  F10  │ 196 │ 221 │ 231 │ 241 │
  1829.     │   P   │  80 │ 112 │  16 │ 153 │     │  F11  │  -  │  -  │  -  │  -  │
  1830.     │   Q   │  81 │ 113 │  17 │ 144 │     │  F12  │  -  │  -  │  -  │  -  │
  1831.     │   R   │  82 │ 114 │  18 │ 147 │     │ UP    │ 2OO │ 2OO │  -  │  -  │
  1832.     │   S   │  83 │ 115 │  19 │ 159 │     │ DOWN  │ 2O8 │ 2O8 │  -  │  -  │
  1833.     │   T   │  84 │ 116 │  20 │ 148 │     │ LEFT  │ 2O3 │ 2O3 │ 243 │  -  │
  1834.     │   U   │  85 │ 117 │  21 │ 150 │     │ RIGHT │ 2O5 │ 2O5 │ 244 │  -  │
  1835.     │   V   │  86 │ 118 │  22 │ 175 │     │ INS   │ 210 │ 210 │  -  │  -  │
  1836.     │   W   │  87 │ 119 │  23 │ 145 │     │ DEL   │ 211 │ 211 │  -  │  -  │
  1837.     │   X   │  88 │ 120 │  24 │ 173 │     │ HOME  │ 199 │ 199 │ 247 │  -  │
  1838.     │   Y   │  89 │ 121 │  25 │ 149 │     │ END   │ 207 │ 207 │ 245 │  -  │
  1839.     │   Z   │  90 │ 122 │  26 │ 172 │     │ PGUP  │ 201 │ 201 │ 101 │  -  │
  1840.     │ 0 or )│  48 │  41 │  -  │  -  │     │ PGDN  │ 209 │ 209 │ 246 │  -  │
  1841.     │ 1 or !│  49 │  33 │  -  │ 248 │     │ - or _│  45 │  95 │  31 │  -  │
  1842.     │ 2 or @│  50 │  64 │ 131 │ 249 │     │ + or =│  61 │  43 │  -  │  -  │
  1843.     │ 3 or #│  51 │  35 │  -  │ 250 │     │ | or \│  92 │ 124 │  28 │  -  │
  1844.     │ 4 or $│  52 │  36 │  -  │ 251 │     │ { or [│  91 │ 123 │  27 │  -  │
  1845.     │ 5 or %│  53 │  37 │  -  │ 252 │     │ ] or }│  93 │ 125 │  29 │  -  │
  1846.     │ 6 or ^│  54 │  94 │  30 │ 253 │     │ : or ;│  59 │  58 │  -  │  -  │
  1847.     │ 7 or &│  55 │  38 │  -  │ 254 │     │ " or '│  39 │  34 │  -  │  -  │
  1848.     │ 8 or *│  56 │  42 │  -  │ 255 │     │ < or ,│  44 │  60 │  -  │  -  │
  1849.     │ 9 or (│  57 │  40 │  -  │  -  │     │ > or .│  46 │  62 │  -  │  -  │
  1850.     │ ` or ~│  96 │ 126 │  -  │  -  │     │ ? or /│  47 │  63 │  -  │  -  │
  1851.     └───────┴─────┴─────┴─────┴─────┘     └───────┴─────┴─────┴─────┴─────┘
  1852.  
  1853. ┌──────────────────────────────────────────────────────────────────────────────┐
  1854. │                               SHOWTEXT FADES                                 │
  1855. ├──────────────────┬┬──────────────────┬┬──────────────────┬┬──────────────────┤
  1856. │ O Quick          ││19 Spiral CW In   ││38 Wipe V Close   ││57 Circ Sweep Down│
  1857. │ 1 Fizz           ││2O Spiral CW Out  ││39 Half Wipe V U/D││58 Circ Sweep Up  │
  1858. │ 2 Melt Down      ││21 Spiral CCW In  ││4O Half Wipe V D/U││59 Radar CW       │
  1859. │ 3 Melt Up        ││22 Spiral CCW Out ││41 Half Wipe H L/R││6O Radar CCW      │
  1860. │ 4 Liquid Flow Dn ││23 Mult Sp CW In  ││42 Half Wipe H R/L││61 Louver H Large │
  1861. │ 5 Liquid Flow Up ││24 Mult Sp CW Out ││43 Checker Down   ││62 Louver H Small │
  1862. │ 6 Quarters - CW  ││25 Mult Sp CCW In ││44 Checker Up     ││63 Louver V Large │
  1863. │ 7 Quarters - CCW ││26 Mult Sp CCW Out││45 Diagonal Right ││64 Louver V Small │
  1864. │ 8 Quarters - Alt ││27 Wipe Down      ││46 Diagonal Left  ││                  │
  1865. │ 9 Blks Random Lg ││28 Wipe Up        ││47 Chckr Lvr 1step││                  │
  1866. │1O Blks Random Sm ││29 Wipe Right     ││48 Chckr Lvr 2step││                  │
  1867. │11 Zigzag H Lg Rt ││3O Wipe Left      ││49 Diagonal Lvr R ││                  │
  1868. │12 Zigzag H Lg Lft││31 Curtain H Open ││5O Diagonal Lvr L ││                  │
  1869. │13 Zigzag H Sm Rt ││32 Curtain H Close││51 Page Feed Down ││                  │
  1870. │14 Zigzag H Sm Lft││33 Curtain V Open ││52 Page Feed Up   ││                  │
  1871. │15 Zigzag V Down  ││34 Curtain V Close││53 Page Feed Right││                  │
  1872. │16 Zigzag V Up    ││35 Wipe H Open    ││54 Page Feed Left ││255 selects a     │
  1873. │17 Orifice Open   ││36 Wipe H Close   ││55 Circ Sweep CW  ││    random fade   │
  1874. │18 Orifice Close  ││37 Wipe V Open    ││56 Circ Sweep CCW ││    from this list│
  1875. └──────────────────┴┴──────────────────┴┴──────────────────┴┴──────────────────┘
  1876. Note: The program FADES.EXE will demonstrate each of these fades.
  1877.  
  1878. Useful information from the BIOS Data Area located at 0040:0000h in low memory
  1879. ────────────────────────────────────┬─┬─┬─┬─┬─┬─┬─┬─┬──────────────────────────
  1880.                                  Bit│7│6│5│4│3│2│1│0│ Meaning
  1881. ────────────────────────────────────┼─┼─┼─┼─┼─┼─┼─┼─┼──────────────────────────
  1882. [BIOS23]  = keyboard status byte #1 │x│ │ │ │ │ │ │ │1=insert mode active
  1883.                                     │ │x│ │ │ │ │ │ │1=caps lock mode active
  1884.                                     │ │ │x│ │ │ │ │ │1=num lock mode active
  1885.                                     │ │ │ │x│ │ │ │ │1=scroll lock mode active
  1886.                                     │ │ │ │ │x│ │ │ │1=either alt key held down
  1887.                                     │ │ │ │ │ │x│ │ │1=either ctrl key held down
  1888.                                     │ │ │ │ │ │ │x│ │1=left shift key held down
  1889.                                     │ │ │ │ │ │ │ │x│1=right shift key held down
  1890. ────────────────────────────────────┼─┼─┼─┼─┼─┼─┼─┼─┼──────────────────────────
  1891. [BIOS24]  = keyboard status byte #2 │x│ │ │ │ │ │ │ │1=insert key held down
  1892.                                     │ │x│ │ │ │ │ │ │1=caps lock key held down
  1893.                                     │ │ │x│ │ │ │ │ │1=num lock key held down
  1894.                                     │ │ │ │x│ │ │ │ │1=scroll lock key held down
  1895.                                     │ │ │ │ │x│ │ │ │1=pause mode active
  1896.                                     │ │ │ │ │ │x│ │ │1=SysReq key held down
  1897.                                     │ │ │ │ │ │ │x│ │1=left alt key held down
  1898.                                     │ │ │ │ │ │ │ │x│1=left ctrl key held down
  1899. ────────────────────────────────────┼─┼─┼─┼─┼─┼─┼─┼─┼──────────────────────────
  1900. [BIOS150] = keyboard status byte #3 │x│ │ │ │ │ │ │ │read ID in progress
  1901.                                     │ │x│ │ │ │ │ │ │last char was 1st ID char
  1902.                                     │ │ │x│ │ │ │ │ │force num lock if ID&KBX
  1903.                                     │ │ │ │x│ │ │ │ │101/102-key kbd installed
  1904.                                     │ │ │ │ │x│ │ │ │1=right alt key held down
  1905.                                     │ │ │ │ │ │x│ │ │1=right ctrl key held down
  1906.                                     │ │ │ │ │ │ │x│ │last code was E0 hidden
  1907.                                     │ │ │ │ │ │ │ │x│last code was E1 hidden
  1908. ────────────────────────────────────┼─┼─┼─┼─┼─┼─┼─┼─┼──────────────────────────
  1909. [BIOS151] = keyboard LED flags      │x│ │ │ │ │ │ │ │kbd xmit error flag
  1910.                                     │ │x│ │ │ │ │ │ │mode indicator update
  1911.                                     │ │ │x│ │ │ │ │ │resend receive flag
  1912.                                     │ │ │ │x│ │ │ │ │ack rcvd
  1913.                                     │ │ │ │ │x│ │ │ │reserved (must be 0)
  1914.                                     │ │ │ │ │ │x│x│x│kbd LED state bits
  1915. ────────────────────────────────────┴─┴─┴─┴─┴─┴─┴─┴─┴──────────────────────────
  1916.  
  1917. [BIOS80]  = cursor column (0 to 79 instead of 1 to 80) 
  1918. [BIOS81]  = cursor row    (0 to 24 instead of 1 to 25)
  1919. [BIOS96]  = cursor type   (ending scan line)
  1920. [BIOS97]  = cursor type   (beginning scan line)
  1921.  
  1922. ───────────────────────────────────────────────────────────────────────────────
  1923.  
  1924. [BIOS108] = system timer ticks (LSB) ──┬──4-byte value
  1925. [BIOS109] = system timer ticks         │
  1926. [BIOS110] = system timer ticks         │
  1927. [BIOS111] = system timer ticks (MSB) ──┘
  1928.  
  1929. ───────────────────────────────────────────────────────────────────────────────
  1930. For example, to see if either shift key is being pressed,
  1931.  
  1932. IF [BIOS23]&3 THEN do_something....
  1933.  
  1934. PROGRAMMING TRICKS AND TIPS
  1935.  
  1936. The following pieces of program code will demonstrate a variety of programming
  1937. principles.  Note that the backslash (\) allows multiple statements on a line.
  1938.  
  1939. 'TO WAIT FOR A KEYSTROKE - NO MATTER HOW LONG IT TAKES
  1940. :CHKIN \ WAITKEY 3600.8,CHKIN
  1941.  
  1942. 'TO EXECUTE A LOOP UNTIL ANY KEY IS PRESSED
  1943. :LOOPIT
  1944. 'any statements here would be executed once during each loop iteration
  1945. WAITKEY 0,LOOPIT
  1946.  
  1947. 'TO EXECUTE A LOOP UNTIL A KEY (OR MOUSE BUTTON) IS PRESSED WHILE THE CURSOR
  1948. 'IS WITHIN THE SPECIFIED BLOCK (WHICH IN THIS CASE IS DEFINED USING VARIABLES)
  1949. :LOOPIT
  1950. 'any statements here would be executed once during each loop iteration
  1951. WAITKEY 0,LOOPIT \ IF NOT CLK(V1,V2,V3,V4)LOOPIT
  1952.  
  1953. 'TO EXECUTE A LOOP UNTIL A NUMBER KEY IS PRESSED (ASCII VALUE 48 TO 57)
  1954. :LOOPNOW
  1955. 'any statements here would be executed once during each loop iteration
  1956. WAITKEY 0,LOOPNOW \ V0=[K] \ IF V0<48 LOOPNOW \ IF V0>57 LOOPNOW
  1957.  
  1958. 'TO BUILD A DEMO PROGRAM USING SCREEN FILES DEMO1.STF,DEMO2.STF,DEMO3.STF
  1959. 'AND DEMO4.STF USING A 3 SECOND DELAY BETWEEN SCREENS (NO FADES) AND ALLOWING
  1960. 'THE PROGRAM TO TERMINATE WHEN THE ESCAPE KEY IS PRESSED
  1961. 'NOTE: THIS PROGRAM USES INTERNAL BUFFERS 1 TO 4. (5 AND 6 ARE NOT USED)
  1962. ON INTKEY0 ESC GOTO QUIT
  1963. COPY(DEMO1,1)\COPY(DEMO2,2)\COPY(DEMO3,3)\COPY(DEMO4,4)
  1964. :START\COPY(1,0)\WAIT 3
  1965.        COPY(2,0)\WAIT 3
  1966.        COPY(3,0)\WAIT 3
  1967.        COPY(4,0)\WAIT 3\GOTO START
  1968. :QUIT\EXITC
  1969.  
  1970. 'TO BUILD A DEMO PROGRAM USING SCREEN FILES DEMO1.STF,DEMO2.STF,DEMO3.STF
  1971. 'AND DEMO4.STF USING A 3 SECOND DELAY BETWEEN SCREENS (NO FADES) AND ALLOWING
  1972. 'THE PROGRAM TO TERMINATE WHEN THE ESCAPE KEY IS PRESSED
  1973. 'NOTE: THIS PROGRAM DOES NOT USE ANY INTERNAL BUFFERS
  1974. '      THIS MEANS MORE DISK ACCESSES ARE NEEDED
  1975. ON INTKEY0 ESC GOTO QUIT
  1976. :START\COPY(DEMO1,0)\WAIT 3
  1977.        COPY(DEMO2,0)\WAIT 3
  1978.        COPY(DEMO3,0)\WAIT 3
  1979.        COPY(DEMO4,0)\WAIT 3\GOTO START
  1980. :QUIT\EXITC
  1981.  
  1982. 'TO PLACE A MARQUEE WINDOW ON THE SCREEN (WITH A MESSAGE)
  1983. COLOR 2,4\WINDOW (11,30,15,50) 104\BFILL 0 (12,31,14,49) ATTR 31
  1984. COLOR 15,1\P@13,35\PRINT "HELLO WORLD"
  1985.  
  1986. PROGRAMMING TRICKS AND TIPS  (continued)
  1987.  
  1988. BUFFER TEXT STRINGS
  1989.  
  1990. There is a special text string which can reside in any of the internal buffers
  1991. (0 to 63) that can be used in place of a quoted string when using PRINT, TTYPE
  1992. PLAY , XFLOAD and XFSAVE.
  1993.  
  1994. The form of the string is $(buf,row,startcolumn,endcolumn)
  1995.  
  1996. where ∙buf is the internal buffer to access (0 to 63)
  1997.       ∙row is the row (1 to 25) where the desired text resides in the buffer
  1998.       ∙startcolumn (1 to 80) and endcolumn (1 to 80) define the starting and
  1999.        ending column location of the text string 
  2000.  
  2001. Note that the information can be specified as numbers, variables (V0 to V255)
  2002. or indexed variables (VV0 to VV255).  If a number greater than 63 is specified,
  2003. the value is ANDed with 63 (to keep the value less than 64).
  2004.  
  2005. For example:
  2006.  
  2007. PRINT $(1,12,35,65) would find the text located in buffer 1 on row 12 starting
  2008.       at column 35 and ending at column 65.  This text would be printed on the
  2009.       screen in the current default color starting at the print cursor location.
  2010.  
  2011. TTYPE $(6,20,1,80) would slow-print the text (in buffer 6, on row 20 between
  2012.                    columns 1 and 80) on the screen.
  2013.  
  2014. PLAY $(4,1,40,60) would play the text string (in buffer 4, on row 1 between
  2015.                   columns 40 and 60).
  2016. ------------------------------------------------------------------------------
  2017. USING BUFFERS AS MEMORY
  2018.  
  2019. The internal buffers (1 to 63) can also be used as memory if the variables
  2020. (V0 to V255) are not enough storage space for data.  This method takes a
  2021. bit more work, but it can be done.  For example,
  2022.  
  2023. POKE 6(1,1)ASCII V2 would store a byte in buffer 6 at row=1, column=1
  2024. PEEK 6(1,1)ASCII V2 would retrieve the previously stored value.
  2025.  
  2026. POKE 6(1,1)ATTR V1 would store a byte in buffer 6 at row=1, column=1
  2027. PEEK 6(1,1)ATTR V1 would retrieve the previously stored value.
  2028.  
  2029. This means that each internal buffer can store 4000 bytes of program data
  2030. because (25 rows x 80 columns) = 2000 bytes. Each row/column position can store
  2031. an ASCII character byte and an ATTRibute byte, therefore 2 x 2000 = 4000 bytes.
  2032.  
  2033. PROGRAMMING TRICKS AND TIPS  (continued)
  2034.  
  2035. The following two listings show how to make a "custom" cursor.  In the first
  2036. example, a white/blue cross-hair symbol (ascii 197) is temporarily placed at
  2037. the cursor location but is replaced by the original character a fraction of a
  2038. second later.  In the second example, the attribute is XORed with 127 to make
  2039. the color "flicker".  Note: Your program should continuously cycle to the
  2040. label (:newcsr) in order to keep redisplaying the custom cursor.
  2041.  
  2042. Example 1.
  2043. :newcsr  %row=[r.] \ %col=[c.] \ csr off
  2044.          peek 0 (%row,%col) %char %attr
  2045.          poke 0 (%row,%col) 197   31    \ wait .09
  2046.          poke 0 (%row,%col) %char %attr \ wait .09 \ waitkey 0,newcsr
  2047.          'you can test key or click values here
  2048.  
  2049. Example 2.
  2050. :newcsr  %row=[r.] \ %col=[c.] \ csr off 
  2051.          peek 0 (%row,%col) attr %attr
  2052.          poke 0 (%row,%col) attr %attr#127 \ wait .09
  2053.          poke 0 (%row,%col) attr %attr     \ wait .09 \ waitkey 0,newcsr
  2054.          'you can test key or click values here
  2055.  
  2056. ##############################################################################
  2057.  
  2058. The following program listing is an alternative to the TEXT INPUT command.
  2059. It is included here in order to further demonstrate the use of ALIASes.
  2060.  
  2061. '------ MAIN PROGRAM ------------------------------------------------------
  2062.         ALIAS %ROW=V200,%COLUMN=V201
  2063.         COLOR 14,1 \ %ROW=10 \ %COLUMN=1 \ GOSUB INPUT
  2064.         EXIT
  2065. '--------------------------------------------------------------------------
  2066. '------ SUBROUTINE --------------------------------------------------------
  2067. :INPUT\ CSR \ C@ %ROW,%COLUMN \ P@ %ROW,%COLUMN \ WAITKEY 0,INPUT
  2068.         IF [K]=13 INPTX \ IF [K]=8 INPT2
  2069. :INPT1\ PRINT CHAR([K]); \ %COLUMN=[C;] \ GOTO INPUT
  2070. :INPT2\ %COLUMN-- \ POKE 0 (%ROW,%COLUMN)ASCII 32 \ GOTO INPUT
  2071. :INPTX\ RET 
  2072. '--------------------------------------------------------------------------
  2073.  
  2074. ##############################################################################
  2075.  
  2076. This short program segment shows how to link several screens together (e.g.
  2077. a HELP section).  The HELP screens are loaded into the upper buffers
  2078. (6O through 63). The Page-Up and Page-Down keys will sequentially cycle through
  2079. these buffers.  The Enter key provides a way to exit this routine.
  2080.  
  2081.        V1=6O \ COPY(HELP1,6O) \ COPY(HELP2,61) \ COPY(HELP3,62) \ COPY(HELP4,63)
  2082. :COPY\ COPY(V1,0)
  2083. :INPT\ WAITKEY  \ IF KEY PGUP DECR \ IF KEY ENTER QUIT 
  2084.                   IF KEY PGDN INCR \ GOTO INPT
  2085. :DECR\ IF V1=6O INPT \ V1=V1-1 \ GOTO COPY
  2086. :INCR\ IF V1=63 INPT \ V1=V1+1 \ GOTO COPY
  2087.  
  2088. :QUIT\ EXITC
  2089.  
  2090. PROGRAMMING TRICKS AND TIPS  (continued)
  2091. The new version of ShowText will allow the programmer to use row values
  2092. greater than 25 (up to 255).  This means that up to ten screens can be linked
  2093. together as though they were part of a large screen having up to 25O rows.
  2094. Note that buffers 1 to 66 are contiguous in memory, and buffers 67 to 73 are
  2095. contiguous in the video adapter memory, so that buffers 66 and 67 are not
  2096. contiguous.  This also means that programmers have access to certain
  2097. "undocumented" buffers outside the O to 63 range.
  2098.  
  2099.  ┌──────┬──────────────────────────────────────────────────────────┐
  2100.  │buffer│ Description                                              │
  2101.  ╞══════╪══════════════════════════════════════════════════════════╡
  2102. *│  64  │ temporary - usually holds last screen loaded from a file │
  2103.  ├──────┼──────────────────────────────────────────────────────────┤
  2104. *│  65  │ temporary - misc. I/O from last file load and screensaver│
  2105.  ├──────┼──────────────────────────────────────────────────────────┤
  2106.  │  66  │ temporary - used only by SAVE/RESTORE                    │
  2107.  ╞══════╪══════════════════════════════════════════════════════════╡
  2108. !│  67  │ CGA,EGA,VGA video adapter page 1 (text mode)             │
  2109.  ├──────┼──────────────────────────────────────────────────────────┤
  2110.  │  68  │ CGA,EGA,VGA video adapter page 2 (text mode)             │
  2111.  ├──────┼──────────────────────────────────────────────────────────┤
  2112.  │  69  │ CGA,EGA,VGA video adapter page 3 (text mode)             │
  2113.  ├──────┼──────────────────────────────────────────────────────────┤
  2114.  │  7O  │ CGA,EGA,VGA video adapter page 4 (text mode)             │
  2115.  ├──────┼──────────────────────────────────────────────────────────┤
  2116.  │  71  │ CGA,EGA,VGA video adapter page 5 (text mode)             │
  2117.  ├──────┼──────────────────────────────────────────────────────────┤
  2118.  │  72  │ CGA,EGA,VGA video adapter page 6 (text mode)             │
  2119.  ├──────┼──────────────────────────────────────────────────────────┤
  2120.  │  73  │ CGA,EGA,VGA video adapter page 7 (text mode)             │
  2121.  └──────┴──────────────────────────────────────────────────────────┘
  2122.  
  2123. ! Note: The ShowText menu program (ST.EXE) stores a 96-byte configuration block
  2124.         containing project name, path etc. in buffer 67 (row 1).
  2125.         If your program uses this area, it will be necessary for you to re-type
  2126.         the project name when you exit back to the ShowText menu. It only
  2127.         occurs when you are in the interactive ShowText environment.  This is a
  2128.         minor inconvenience and not a serious problem.
  2129.  
  2130. * Note: The COPY(source,destination) performs a screen-file-load if source is
  2131.         a name (not a variable or number).  e.g. COPY(filename,7)14
  2132.         The first temporary buffer (bfr=64) is overwritten only if a non-zero
  2133.         fade is specified on the screen-file-load COPY command. The second
  2134.         temporary buffer (bfr=65) is always overwritten by the command,
  2135.         COPY(filename,bfr).  Buffer 65 is also used as the screensaver area.
  2136.         Use these extra buffer areas carefully!
  2137.  
  2138. SHOWTEXT Revision History:
  2139.  
  2140. O9/12/1995 - v 1.9
  2141.   +  Added the $BUFFERS compiler directive
  2142.   +  Added the feature that puts the directory of the currently running EXE
  2143.      file in bfr=1 (row=4,col=1); its length is placed in the attribute
  2144.      byte of the character in bfr=1 (row=5,col=1); no capitalization is done
  2145.   +  Added the following system variables: [chk], [arrows], [csr] and [intk]
  2146.   *  Changed the program so that the DOS command line is placed in bfr=1
  2147.      (row=1,col=1); its length is placed in the attribute byte of the character
  2148.      in bfr=1 (row=3,col=1); no capitalization is done. This change was made to
  2149.      accomodate the new $BUFFERS directive (in case only 1 buffer was used).
  2150.  
  2151. O8/17/1995 - v 1.8
  2152.   +  Added the feature that puts the DOS command line in bfr=63 (row=1,col=1);
  2153.      its length is placed in the attribute byte of the character in bfr=63
  2154.      (row=3,col=1); no capitalization is done
  2155.   +  Added the +/-/. shortcut command prefixes for a,c,i,k,m,p,s,t__,v___,x,y
  2156.   +  Added the MOUSE ON / MOUSE OFF instructions
  2157.   +  Added the XBLOAD and XBSAVE instructions
  2158.   *  The compiler no longer accepts the keywords (AND,OR,XOR,MOD),
  2159.      use the symbols (&, @ or |, #, ~) respectively instead.
  2160.   +  Added new instruction (;=force variable into range): ;min,%variable,max 
  2161.   +  Added new system variables: [POP], [;min:val:max], 
  2162.                                  [F:buf:row:col] and [B:buf:row:col]
  2163.   +  Added new instruction:  CALL subroutine(val,val,..etc..)var,var,..etc..
  2164.   *  Changed the PUSH to accept numeric values and all variable types,
  2165.      although the POP still accepts only normal (non-indexed) variables.
  2166.      (!! IMPORTANT !! note: The range on a PUSH/POP now uses (:) instead of (-)
  2167.       e.g. PUSH V1,V2:V7,V8 instead of PUSH V1,V2-V7,V8 )
  2168.      To recompile older programs, you -must- change the (-) to (:) manually,
  2169.      because the compiler may not catch all PUSH/POP errors in older programs.
  2170.  
  2171. O7/1O/1995 - v 1.7
  2172.   +  Added the INTKEYS ON|OFF|CLEAR command
  2173.   *  Increased the number of interrupt keys: (ON INTKEYn ...) n=0 to 15
  2174.   +  Added the Block-MODify-attributes (BMOD) command:
  2175.      BMOD bfr (r1,c1,r2,c2) and_mask , or_mask , xor_mask
  2176.      (Note: The BMOD command replaces the BXOR command!)
  2177.   +  Added Alt-P (Paint Mode Select) option to the drawing program (STD.EXE)
  2178.  
  2179. O3/2O/1995 - v 1.6
  2180.   +  Added the [BIOSaddr] system variable (e.g. [BIOS23] is kbd status byte #1)
  2181.   +  Added the option to use the NSTEP keyword (NegativeSTEP) in a FOR statement
  2182.   +  Added the timer(ticks)-in-range? system variable [TM:lowval:timer#:highval]
  2183.   *  Modified the timer(ticks) system variable [Tn] to allow math
  2184.      (e.g. %X=[T%i+1] )
  2185.   *  Modified the RST T instruction to allow math operations (e.g. RST T%i+1)
  2186.   *  Modified the RESTORE instruction so that it would also reset cursor limits
  2187.   √  Fixed a minor bug in the FOR/NEXT instructions to properly handle 
  2188.      math expressions.
  2189.  
  2190. SHOWTEXT Revision History (continued):
  2191.  
  2192. O2/15/1995 - v 1.5
  2193.   +  Added the GOLOOP,EXITDO,GONEXT,EXITFOR,GOWEND,EXITWHILE instructions
  2194.   +  Added the DIRTOP,DIRBOT,DIRPRV,DIRNXT,DIRCMP,DIRCPY,DIRFND,DIRPRT commands
  2195.   +  Added the [FB:fg:bg] and [DIR] system variables
  2196.   *  Modified the compiler (STC.EXE) to show status bar during compilation
  2197.   +  Added the second form of the WINDOW command (i.e. with attribute value):
  2198.      WINDOW (r1,c1,r2,c2)windowtype,attribute
  2199.   *  Modified the XFSAVE/XFLOAD commands to use .STF file type (instead of .SCN)
  2200.   √  Fixed a bug in the COPY($(bfr,row,start,end),destbfr)fade command
  2201.   -  Removed the NAND(_), NOR(|) and XNOR(~) math operators and
  2202.      changed (|) to OR (same as @) - and also changed MOD symbol from ({) to (~)
  2203.   +  Added several options to the ShowText Drawing Program (STD.EXE)
  2204.  
  2205. O1/17/1995 - v 1.4
  2206.   *  Modified the SAVE/RESTORE commands to include ALL screen parameters
  2207.   +  Added the [IR:lowvalue:testvalue:highvalue] system variable (in-range?)
  2208.   +  Added the ability to imbed a system variable inside another system variable
  2209.   +  Added the $DOS, $LIB ADD and $LIB DIR compiler directives
  2210.   +  Added the P+ and P- commands
  2211.   *  Modified the COPY  command:
  2212.      It now allows COPY( $(bfr,row,startcolumn,endcolumn) , destbfr ) fade
  2213.      which performs a filename table lookup
  2214.  
  2215. O9/28/1994 - v 1.3
  2216.   *  Modified the CLS   command: It now places the print cursor at row=1,col=1
  2217.   *  Modified the EXIT  command: It places the DOS cursor at the print cursor
  2218.   *  Modified the EXITC command: It now resets VIRTUAL mode before exiting
  2219.   *  Modified the ShareWare banner opening screen
  2220.  
  2221. O9/24/1994 - v 1.2
  2222.   +  Added new system variables: [AS:buf:row:col] , [AT:buf:row:col] and [VIRT]
  2223.   +  Added the XFLOAD and XFSAVE commands.
  2224.   √  Fixed a bug in the PLAY command (from v 1.1).
  2225.   +  Added the ability to specify buf=0 in the $(buf,row,col1,col2) text string
  2226.  
  2227. O7/O8/1994 - v 1.1
  2228.   +  Added ARROWS ON and ARROWS OFF commands
  2229.   +  Added the ability to use row>25 and/or col>80 for most operations
  2230.   +  Added IF-THEN-ELSEIF-ELSE-ENDIF
  2231.   +  Added SELECT CASE\CASE\CASE ELSE\END SELECT
  2232.   +  Added DO\LOOP and WHILE\WEND looping structures
  2233.   +  Added support for embedded mathematics expression evaluation including
  2234.      nested parentheses. 
  2235.   +  Added new mathematics operators:   ^  }  ++  -- 
  2236.   +  Added comparison operators:  <   =   >   <=   <>   >=
  2237.   +  Added logic operators:  NOT, AND,  OR, XOR, NAND, NOR, XNOR
  2238.                              (`)  (&)  (@)  (#)   (_)  (|)   (~)
  2239.   +  Added several new system variables 
  2240.      (e.g.  [OVR] and [.r1:c1:r2:c2] and [r1:c1:r2:c2.] )
  2241.   *  Changed the way that system variables are accessed.
  2242.      (ex:  old-way    SYS v1 KEY \ if v1=27 quit   )
  2243.      (ex:  new-way    if [K]=27 quit               )
  2244.  
  2245. O5/15/1994 - v 1.O
  2246.   +  Original public release as shareware.
  2247.  
  2248. SHOWTEXT REGISTRATION ORDER FORM
  2249.  
  2250. The REGISTERED version does not generate the initial UNREGISTERED banner.
  2251.  
  2252. Name     ____________________________________________________
  2253.  
  2254. Address  ____________________________________________________
  2255.  
  2256.          ____________________________________________________
  2257.  
  2258.          ____________________________________________________
  2259.  
  2260. Please specify the version of ShowText you are using and where you got it.
  2261.          Version ____________     Source ____________________
  2262.  
  2263. NOTE: SHOWTEXT is distributed on high-density disks ONLY !!!
  2264. Disk Type (check one)   [ ] 5.25" (1.2  Meg)     or    [ ]  3.5" (1.44 Meg)
  2265.  
  2266. Please make check/money order ( $ 25.OO ) to: Garry Spencer/Spencer Technologies
  2267.  
  2268. and mail to: Garry Spencer/Spencer Technologies
  2269.              P. O. Box 34OO9 - Memphis, TN - 38184-OOO9
  2270.              Please do not send cash.  Please allow 3 to 4 weeks for delivery.
  2271.  
  2272. Licensing Information and Disclaimer:
  2273. ------------------------------------------------------------------------------
  2274. O.K. , here's the deal:
  2275. Many hours have been spent on the design and programming of the ShowText system.
  2276. (This is an understatement :-).  Every command has been carefully tested,
  2277. HOWEVER Spencer Technologies/Garry Spencer and any operating principals of the
  2278. company are not liable for the use of this software.
  2279.  
  2280. Upon receipt of your registration fee, you will be sent the latest REGISTERED
  2281. version of ShowText.  The REGISTERED version will be in a sealed package.
  2282. EACH diskette is checked for readability before shipping!  When the REGISTERED
  2283. version is opened and the seal is broken, it is yours to keep. No refunds.
  2284. If the diskette is damaged in transit, you may return the diskette (at your
  2285. own expense within 2 weeks). You will receive another diskette, but no refund.
  2286. This will be done only once per registration.  We apologize to the honest 
  2287. users, but some dishonest users would abuse a return-for-refund policy :-(
  2288.  
  2289. You will be issued a unique registration code which entitles you to technical
  2290. support (up to three requests by MAIL only).  This explains why the registration
  2291. fee is so low, compared to other packages costing much more.
  2292. Please consider the cost of duplication, handling, postage, TAXE$, pizza etc.
  2293.  
  2294. Please sign below if you agree with the terms and limitations of this license
  2295. agreement.  Only signed order forms can be processed.  Thank you for ordering
  2296. ShowText.
  2297.  
  2298. Signature _____________________________
  2299.  
  2300.