home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / DIVERSEN / SHWTXT12 / SHOWTEXT.DOC < prev    next >
Text File  |  1994-09-24  |  92KB  |  1,754 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.  
  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 SHWTXT10.ZIP where
  74. (10) indicates version (1.0) .
  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. At one time,
  195.        these bounds were checked and adjusted, but these values are now 
  196.        allowed to be as high as 255 in order to provide the programmer with
  197.        some interesting options, such as linking up to 10 internal buffers
  198.        together with row offsets (from the first buffer) up to 250.  The 
  199.        minimum values are usually still adjusted to 1 if zero is given.
  200. ------------------------------------------------------------------------------
  201.        Labels are used to allow the program to resume execution at a different
  202.        location within the program. A label begins with a semi-colon (:) and
  203.        must be defined only once.  Note that a label must not contain embedded
  204.        spaces and may only be 8 characters (or less) in length.  It must
  205.        contain ONLY letters and/or numbers.  For example,
  206.  
  207.                    GOTO TEST123
  208.                    ∙∙∙(other statements skipped)∙∙∙
  209.        :TEST123    PRINT "Done"
  210. ------------------------------------------------------------------------------
  211.        Multiple statements (and labels) are allowed on the same program line by
  212.        separating the statements with a backslash.  For example,
  213.  
  214.        :QUIT                is the same as          :QUIT\CLS 7,0\C@1,1\EXIT
  215.         CLS 7,0
  216.         C@1,1
  217.         EXIT 
  218. ------------------------------------------------------------------------------
  219.        A program line can be continued on the next physical line by ending the
  220.        line with an underscore (_). Any leading spaces on the continuation line
  221.        are trimmed.  If leading spaces are to be preserved on the continuation
  222.        line, then start that line with an underscore (_).  Note: If any 
  223.        physical line starts with an underscore, the underscore is removed.
  224.        ex:  print "this   is _
  225.             _  a   test"
  226.             'preserve embedded spaces by placing underscore at the beginning
  227.        ex:  bfill 0 to 1 (1,1,_
  228.             25,80) 32 31
  229. ------------------------------------------------------------------------------
  230.        [var] is a variable (V0 to V255) or an indexed variable (VV0 to VV255).
  231.        [val] can also be a variable, an indexed variable or a number (0 to 255).
  232.        A variable is similar to an array element. V0 to V255 is similar to
  233.        V(0) to V(255) in some other languages.  An indexed variable uses the
  234.        contents of another variable as an index. VV0 to VV255 is similar to
  235.        V(V(0)) to V(V(255)).  There are still only 256 variables in the 
  236.        system.  Indexing only allows more options for the programmer. 
  237.        Variables may only contain values of 0 to 255.  Variables may assume an
  238.        optional alias by using the (%) sign followed by the alias-name.
  239.        ex: %TEMP=%MISC+4   'See the ALIAS command for more information.
  240. ------------------------------------------------------------------------------
  241.        The single-quote mark (') begins a comment line. The comment continues
  242.        until it reaches either the end of the line or a backspace (\).
  243.        'This is a test
  244.        %Test=%Temp+%Misc
  245.        %A=3 'set %A to 3 \ %B=7 'set %B to 7
  246.  
  247.        PROGRAMMING CONVENTIONS (cont'd)
  248.  
  249.        SPECIAL NOTES ABOUT IF STATEMENTS !!!
  250. ------------------------------------------------------------------------------
  251.        The (IF) statements normally assume that a GOTO will be executed if the
  252.        specified conditions are met.  The keyword GOTO is not necessary.  The
  253.        keyword GOSUB may be specified in any (IF) statement in order to allow
  254.        the program to jump to a subroutine. This rule works for ANY (IF)
  255.        statements.  For example,
  256.        IF CLK(10,25,15,60) TEST         would GOTO TEST  if condition is true 
  257.        IF CLK(10,25,15,60) GOSUB TEST   would GOSUB TEST if condition is true
  258. ------------------------------------------------------------------------------
  259.        ShowText now supports the standard IF-statement formats, such as:
  260.  
  261.        1. single-line IF
  262.           IF condition THEN true_action
  263.  
  264.        2. single-line IF
  265.           IF condition THEN true_action ELSE false_action
  266.  
  267.        3. block IF
  268.           IF condition_1 THEN
  269.              true_action_1
  270.           ELSEIF condition_2
  271.              false_action_1 and true_action_2
  272.           ELSE
  273.              false_action_1 and false_action_2
  274.           ENDIF
  275.  
  276.        SHOWTEXT PROGRAMMING LANGUAGE
  277. ------------------------------------------------------------------------------
  278.        ALIAS %aliasname=var,%aliasname=var ...etc
  279.  
  280.        Variables may assume an optional alias by using the (%) sign followed 
  281.        by the alias-name (using ONLY letters and/or numbers). Each alias can
  282.        be assigned only once. If a previously unassigned alias is encountered
  283.        in the program, it will be automatically assigned to the highest
  284.        subscript variable that does not already have an alias. Please note that
  285.        there are only 256 variables in the system and the variables can still
  286.        be accessed directly by using the Vxxx form. The compiler simply
  287.        performs a search-and-replace operation on the (%) terms.
  288.        ALIAS %ABC=V1,%XYZ=V5,%TMP=V12  (assigns alias %ABC to variable V1,
  289.                                         %XYZ to V5 and %TMP to V12)
  290.        ALIAS %TEMP=V4,%MISC=V8
  291.        %TEMP=7 \ %MISC = %TEMP + V3     is the same as     V4=7 \ V8=V4+V3
  292.  
  293.        Note: All alias names are converted to UPPERCASE by the compiler.
  294.              See the GUESS.ST and MMIND.ST programs for examples of alias use.
  295. ------------------------------------------------------------------------------
  296.        ARROWS
  297.        ARROWS OFF
  298.  
  299.        These two commands control how the arrow keys (up,down,left and right)
  300.        are interpreted by the system.  The first form (ARROWS) will cause the
  301.        program to move the screen cursor in response to the arrow keys. This
  302.        is the default mode.  The second form will cause the program to return
  303.        a keycode (up=200, down=208, left=203 and right=205) without moving the
  304.        screen cursor.  The mouse, if present, will continue to be able to move
  305.        the cursor.
  306. ------------------------------------------------------------------------------
  307.        ATTR val
  308.  
  309.        This instruction changes the current screen color to val,
  310.        where val is the decimal equivalent of the binary attribute code
  311.        in the form:
  312.  
  313.        bbbbbbbb
  314.        │└─┤└──┴─── foreground color 0 to 15
  315.        │  └─────── background color 0 to 7
  316.        └────────── blink bit (foreground will blink if set)
  317.  
  318.        (see the table for the COLOR statement to determine colors)
  319.        Variables or numbers may be used to specify (val).
  320.        This instruction is useful where the default colors have been stored in
  321.        a variable with ( var=[AT;] ).  The color can be restored very easily
  322.        with (ATTR var).
  323.        example:  ATTR 31 would set foreground to white and background to blue
  324.                  white=15  blue=1   color_byte= (1*16) + 15 = 31
  325. ------------------------------------------------------------------------------
  326.        BEEP
  327.  
  328.        This instruction causes the PC speaker to emit a short beep (tone).
  329.  
  330.        BCOPY source TO dest (row1,col1,row2,col2)
  331.        BCOPY source TO dest (row1,col1,row2,col2) OFFSET (row3,col3)
  332.  
  333.        This instruction (in both forms) copies a block of text from the
  334.        source buffer (0 to 63) to the destination buffer (0 to 63).  The
  335.        block is defined by the row1,col1 (upper-left corner) and the row2,col2
  336.        (lower-right corner).  The first form of the instruction copies the
  337.        text to the same part of the buffer.  The second form of the instruction
  338.        copies the text to the upper-left corner defined by row3,col3 providing
  339.        a way to offset the text in the destination buffer.  Variables and/or
  340.        numbers may be used for the row/column information. The word OFFSET is
  341.        optional.
  342.        Note: buffer 0 is the screen - buffers 1 to 63 are internal buffers
  343.        example: BCOPY 1 TO 0 (1,1,25,80) 'copy entire buffer 1 to screen
  344. ----------------------------------------------------------------------------
  345.        BFILL buffer (row1,col1,row2,col2) ASCII val
  346.        BFILL buffer (row1,col1,row2,col2) ATTR val
  347.        BFILL buffer (row1,col1,row2,col2) val val
  348.  
  349.        This instruction (in all three forms) will fill an area in the buffer
  350.        with an ASCII character and/or an attribute (foreground/background 
  351.        color).  The boundaries of the block are defined by row1,col1 (as the
  352.        upper-left corner) and row2,col2 (as the lower-right corner). The first
  353.        form, with the keyword ASCII, will only fill the block with the ASCII
  354.        character code specified in val.  The second form, with the ATTR keyword,
  355.        will only fill the block with the foreground/background color specified
  356.        as an attribute in val.  The third form, with two values, will fill the
  357.        block with the ASCII character code specified in the first val and the
  358.        foreground/background color specified as an attribute in the second val.
  359.        See the ATTR command for a description of an attribute byte.
  360.        e.g. BFILL 0 (11,42,15,61) 32 7
  361.             fills the area on the screen with black spaces.
  362.        Note: buf=0 for screen or buf=1 through 63 for internal buffers
  363. -------------------------------------------------------------------------------
  364.        BSWAP buffer TO buffer (row1,col1,row2,col2)
  365.        BSWAP buffer TO buffer (row1,col1,row2,col2) OFFSET (row3,col3)
  366.  
  367.        This instruction is nearly identical to the BCOPY command, except
  368.        that the two blocks are swapped.  see: BCOPY
  369.        example: BSWAP 0 TO 1 (1,1,25,80) 'swap entire screen with buffer 1
  370. -------------------------------------------------------------------------------
  371.        BXOR buffer (row1,col1,row2,col2) xorvalue
  372.  
  373.        The BLOCK-EXCLUSIVE-OR instruction causes the color attributes in the
  374.        specified "block" (or "box") in the selected buffer to be XORed with the
  375.        xorvalue.  This can be used to make the block flash etc.  If a region is
  376.        XORed twice with the same xorvalue, then the color attributes of that
  377.        region will be returned to their original values.
  378.        example:  BXOR 0 (1,1,25,80) 127 \ WAIT .09 'flash the entire screen
  379.                  BXOR 0 (1,1,25,80) 127 \ WAIT .09 'then return to normal
  380.        Note: upper-left-corner is row1,col1 and lower-right-corner is row2,col2
  381. -------------------------------------------------------------------------------
  382.        C@ row,column
  383.  
  384.        This instruction locates the screen cursor at the specified row 
  385.        (1 to 25) and column (1 to 80).  For example, C@12,40 would locate
  386.        the screen cursor at row 12 and column 40.
  387.  
  388. -------------------------------------------------------------------------------
  389.        CHK    and    NOCHK
  390.  
  391.        These instructions turn the keyboard/mouse monitoring routines ON/OFF.
  392.        The program normally checks the keyboard/mouse status between each
  393.        statement.  This allows quick response to user input especially the
  394.        interrupt keys specified in the ON INTKEYn statements, but can also
  395.        slow the program down during intensive tasks such as repetitive PEEK
  396.        and POKE operations.  The NOCHK command causes the program to ignore
  397.        the keyboard and mouse except when a WAIT or WAITKEY command is
  398.        executed.  This statement should be used carefully because it can cause
  399.        the cursor to 'freeze' at a point on the screen between WAIT and/or
  400.        WAITKEY statements.  The CHK command should be executed as soon as
  401.        possible.  It may occasionally be necessary for the RST K
  402.        command to be executed prior to executing the CHK statement, because
  403.        it will clear the PC keyboard buffer of any input encountered while the
  404.        NOCHK was in effect.
  405. ----------------------------------------------------------------------------
  406.        CLS   or   CLS foreground,background
  407.  
  408.        This instruction (in both forms) clears the screen.  The first form
  409.        clears the screen in the current foreground/background colors.
  410.        The second form is equivalent to COLOR foreground,background\CLS.  The
  411.        colors may be variables or numbers.  See the table of colors for the
  412.        COLOR command. example: CLS 15,1 
  413.                      'clear screen white foreground (15) & blue background (1)
  414. ----------------------------------------------------------------------------
  415.        COLOR foreground
  416.        COLOR foreground,background
  417.  
  418.        This instruction (in both forms) changes the default screen color. 
  419.        The first form only changes the foreground while the second form
  420.        changes both the foreground and background colors.  The available
  421.        colors are shown in the following table:
  422.  
  423.           Foreground                        Background
  424.        ------------------                   --------------------
  425.        0  black                             0   black
  426.        1  blue                              1   blue
  427.        2  green                             2   green
  428.        3  cyan (blue-green)                 3   cyan (blue-green)
  429.        4  red                               4   red
  430.        5  magenta (purple)                  5   magenta (purple)
  431.        6  brown                             6   brown
  432.        7  light gray                        7   dark gray
  433.        8  dark gray
  434.        9  bright blue
  435.       10  bright green
  436.       11  bright cyan (blue-green)
  437.       12  bright red
  438.       13  bright magenta (purple)
  439.       14  bright yellow
  440.       15  bright white
  441.  
  442.       Note: The text can be made to blink by adding 16 to the foreground color.
  443.             Variables or numbers may be used to specify the colors.
  444.       example: COLOR 4,3 'change colors to red foreground=4, cyan background=3
  445.  
  446.        COPY (source,destination)
  447.        COPY (source,destination) fade
  448.  
  449.        This instruction is the heart of the ShowText system.  In both forms,
  450.        it allows an entire screen image to be copied from the source to the
  451.        destination.
  452.  
  453.        The source and destination may be:
  454.              0        which is the screen
  455.              1 to 63  which are internal buffers
  456.              variables V0 TO V255
  457.              indexed variables VV0 to VV255.
  458.        Note: The contents of variables are ANDed with 63 at run-time in order
  459.              to force the source/destination into the range of 0 to 63.
  460.  
  461.        The source may also be a library file specified by up to 8 characters.
  462.        The default (only) extension is .STF.  These files must be present in
  463.        the current directory at compile time (using STC.EXE).  These files are
  464.        stored in the resultant .EXE executable file.  This means that the
  465.        individual (.STF) files do not need to be distributed to the end user of
  466.        the (.EXE) executable file.  The file names must NOT be in the same form
  467.        as a variable or number (e.g. 123, V123, VV123 etc.) since the compiler
  468.        would assume that you meant to use an actual variable or number as the
  469.        source buffer number. 
  470.  
  471.        For example, COPY (TEST,7) would copy the file TEST.STF (which had 
  472.        been stored in library format inside the .EXE file) to internal buffer 7.
  473.  
  474.        The second form of this instruction may be used whenever the destination 
  475.        is buffer 0 (which is the screen).  The "fade" value can be a number or a
  476.        variable and tells the program how to draw the image on the screen.  The
  477.        ShowText system supports a fairly large number of fades.  If a fade is
  478.        specified that is greater than the number of available fades, the default
  479.        fade of 0 (quick) is used.  If the fade number 255 is used, the program
  480.        will pick a fade at random.
  481.  
  482.        For example, V7=4 \ COPY (V7,0) 1
  483.                     '---or---
  484.                     COPY (4,0) 1
  485.  
  486.        would copy the screen image in buffer 4 to the screen using the fizz
  487.        fade.  Please refer to the table of available fades in the appendix of
  488.        this documentation file.
  489.  
  490.        CSR LIM (top_row , leftmost_column , bottom_row , rightmost_column)
  491.        CSR LIM
  492.  
  493.        The first form, with operands, sets the limits on the screen cursor
  494.        location and the second form, with no operands, restores the limits 
  495.        to include the entire screen.
  496.        ex: WINDOW (15,35,25,65) 100 \ CSR LIM (15,35,25,65)
  497.            'this would force the cursor to stay inside the window
  498.            'upper-left (row=15,column=35) and lower-right (row=25,column=65)
  499. ----------------------------------------------------------------------------
  500.        CSR ON num TO num            (where num is the scan line 0 to 7)
  501.        CSR                          (default is CSR ON)
  502.        CSR OFF
  503.  
  504.        The first form (CSR ON num TO num ) will cause the cursor to be
  505.        visible.  The two numbers determine the size of the cursor.  Scan
  506.        line 0 is the top, while scan line 7 is the bottom line (of the cursor)
  507.        on a VGA monitor.  The form (CSR OFF) causes the cursor to be
  508.        invisible.  Variables can NOT be used to specify the scan lines.
  509.        Note: When a program (.EXE) is run, the cursor will initially be off.
  510.        For example:
  511.        CSR ON 0 TO 7 makes a large cursor appear on the screen
  512.        CSR OFF turns the cursor off
  513.        CSR with no arguments turns cursor on using last scan numbers 0 & 7
  514. ----------------------------------------------------------------------------
  515. form1: DO {WHILE|UNTIL|UNLESS} condition
  516.        ∙∙∙                              
  517.        ∙∙∙statements∙∙∙                 
  518.        ∙∙∙                              
  519.        LOOP                             
  520.  
  521. form2: DO
  522.        ∙∙∙
  523.        ∙∙∙statements∙∙∙
  524.        ∙∙∙
  525.        LOOP {WHILE|UNTIL|UNLESS} condition
  526.  
  527.        The first form of the DO-LOOP tests the condition for looping at the
  528.        beginning of the loop.  The second form performs the test at the end of 
  529.        the loop.  One of the keywords WHILE/UNTIL/UNLESS is necessary to specify
  530.        which type of test to perform.  Looping will continue as long as the
  531.        conditions are met.  For example, the following two loops would print
  532.        the numbers 1 through 10.
  533.  
  534.          %I=0                            %I=1
  535.          DO                              DO WHILE %I<=10
  536.          %I++                            PRINT %I,3Q
  537.          PRINT %I,3Q                     %I++
  538.          LOOP UNTIL %I=10                LOOP
  539.  
  540. ----------------------------------------------------------------------------
  541.        ERRORLEVEL val
  542.  
  543.        This instruction sets the DOS ERRORLEVEL variable to (val).  The last
  544.        ERRORLEVEL statement executed before the program exits will determine
  545.        the value which is returned to DOS.  This value can be tested by DOS
  546.        in a batch file to allow branching or conditional execution of a
  547.        particular batch command.  This makes it possible to use ShowText in
  548.        a batch file menuing system.  The argument (val) can be a number or a
  549.        variable.  Its initial value is zero.
  550.        example: ERRORLEVEL 7 would set the DOS error level to 7
  551. ----------------------------------------------------------------------------
  552.  
  553.        EXIT
  554.        EXITC
  555.  
  556.        The EXIT instruction allows the program to return to DOS (or to the
  557.        ShowText menu).  If the .EXE program is invoked from DOS, then it
  558.        will exit to DOS.  Note that the screen is not cleared.  If you wish
  559.        to end a program with the screen cleared and with the cursor at
  560.        row 1 and column 1, then use the command EXITC.
  561.  
  562.        FOR loop_var = loop1 to loop2 STEP loop3
  563.        NEXT loop_var
  564.  
  565.        (where the loop variable (loop_var) must be a variable V0 to V255,
  566.         and must NOT be an indexed variable.)
  567.        (loop1,loop2 and loop3 can be numbers, variables or indexed variables)
  568.  
  569.         These instructions allow the program to loop through a section of
  570.         program code - between the FOR and the NEXT statements.
  571.  
  572.         loop1 = starting value of the loop variable (loop_var).
  573.         loop2 = ending value for the loop variable
  574.         loop3 = incremental step between iterations (always greater than zero)
  575.                (default is 1 if the word STEP and loop3 are not specified)
  576.  
  577.         For example:   FOR V1=3 TO 9 STEP 2
  578.                        PRINT V1,1
  579.                        NEXT V1
  580.         would cause the variable V1 to be printed with values of 3,5,7 and 9.
  581.  
  582.         Note:  The FOR/NEXT loops can be nested, but be careful to nest these
  583.                loops properly.
  584.                e.g.   right:  FOR V1=1 TO 4 \ FOR V2=3 TO 9 \ NEXT V2 \ NEXT V1
  585.                       wrong:  FOR V1=1 TO 4 \ FOR V2=3 TO 9 \ NEXT V1 \ NEXT V2
  586.               If NEXT is specified without a variable, the last open FOR loop
  587.               variable is used.  For example,
  588.               FOR V1=1 TO 10 \ FOR V2=3 TO 5 \ NEXT \ NEXT
  589.               The first NEXT closes the FOR V2 loop and the second NEXT closes
  590.               the FOR V1 loop.
  591. ------------------------------------------------------------------------------
  592.  
  593.        GOTO label
  594.  
  595.        This instruction transfers control to the specified label.  Program
  596.        execution will continue at that point in the program code.  The label
  597.        can be preceded by a (:) in the GOTO statement.
  598.        For example   GOTO :TEST    and    GOTO TEST  are identical in operation.
  599.  
  600. ------------------------------------------------------------------------------
  601.  
  602.        GOSUB label
  603.   
  604.        RETURN or RET
  605.  
  606.        The GOSUB statement pushes the address immediately following the GOSUB
  607.        onto the stack.  The program will then transfer control to the specified
  608.        label (like a GOTO).  The subroutine will continue execution until a
  609.        RETURN is encountered.  The RETURN will pop an address off the stack and
  610.        will transfer control to that address.  If the stack is empty (as in the
  611.        case when a RETURN without GOSUB situation occurs) the RETURN statement
  612.        would not signal an error but would simply do nothing.
  613.        example: :HERE  \ GOSUB TEMP
  614.                 :THERE \ ...other statements...
  615.                 :TEMP  \ PRINT "subroutine called" \ RET
  616.        When the label (HERE) is reached, control goes to (TEMP).  The RET
  617.        causes program execution to continue at label (THERE).
  618.  
  619.        IF BSAME buf TO buf (row1,col1,row2,col2) (row3,col3) label
  620.        IF BDIFF buf TO buf (row1,col1,row2,col2) (row3,col3) label
  621.  
  622.        The first instruction compares the contents of two buffers and performs
  623.        a GOTO label if the blocks are the same.  If the specified blocks are
  624.        not the same, program execution continues at the statement following the
  625.        IF BSAME instruction.  The comparison is performed on ASCII text only
  626.        (i.e. the attribute is not checked).  The coordinates row1,col1,row2,col2
  627.        correspond to the upper-left and lower-right corners (respectively) of
  628.        the block in the first buffer.  The coordinates row3,col3 correspond to
  629.        upper-left corner of the block in the second buffer.  Note that if the
  630.        (row3,col3) term is omitted then the same coordinates are used in BOTH
  631.        blocks/buffers.  If a coordinate is specified outside the range (row=1
  632.        to 25 and col=1 to 80) the block is downsized accordingly.  Normally,
  633.        this should not be a problem.  Buffer 0=screen and buffer 1 through 63
  634.        are internal buffers.
  635.        example: IF BSAME 0 TO 1 (1,1,25,80) (1,1) ALIKE
  636.               'if entire screen is identical to buffer 1 then go to label ALIKE 
  637.               'else continue at statement following this IF BSAME instruction
  638.        Note: The IF BDIFF instruction will GOTO label if the blocks are 
  639.              different.
  640.  
  641.  
  642.        IF CLK (row1,col1,row2,col2) label
  643.        IF NOT CLK (row1,col1,row2,col2) label
  644.  
  645.        When the user presses a key (or a mouse button), the ShowText system
  646.        generates three things: a KEY (0 to 255) value , a ROW CLICK
  647.        (row 1 to 25) value and a COLUMN CLICK (column 1 to 80) value.  These
  648.        values are placed in a 63 byte circular (first-in-first-out) buffer.
  649.        The O-N-L-Y way to make these values available to the program is to
  650.        execute a WAITKEY command.  The WAITKEY command retrieves the next
  651.        character in the keyclick buffer.  If no user input is waiting then
  652.        KEY=0 (NULL),ROW CLICK=0 and COLUMN CLICK=0.
  653.  
  654.        The IF CLK and IF NOT CLK commands simply test the last (row,column)
  655.        click values which were made available by the WAITKEY command.
  656.        A block on the screen defined by the upper-left (row1,col1) and the 
  657.        lower-right (row2,col2) coordinates is tested to see if the last click
  658.        was within its range.  The first form (IF CLK) will execute a GOTO
  659.        label if it was within its defined block.  The second form (IF NOT CLK)
  660.        will execute a GOTO label if it was not within its defined block.
  661.  
  662.        If either of the IF statements fail, the program continues execution
  663.        at the statement immediately following the IF statement.  This is the
  664.        way all of the IF statements work.
  665.  
  666.        example: IF CLK (25,1,25,80) TEMP
  667.        If the mouse/keyboard is pressed while the cursor is on the bottom
  668.        row (25), then program execution will continue at label TEMP.
  669. ----------------------------------------------------------------------------
  670.  
  671.        IF CSR (row1,col1,row2,col2) label
  672.        IF NOT CSR (row1,col1,row2,col2) label
  673.  
  674.        where row1,col1 define the upper-left corner of the test block while
  675.        row2,col2 define the lower-right corner.
  676.  
  677.        These instructions check the location of the screen cursor to determine
  678.        if it is within the defined block.  The IF CSR instruction will
  679.        execute a GOTO label if the screen cursor is within its defined block.
  680.        The IF NOT CSR will execute a GOTO label if the screen cursor is not
  681.        within its defined block.
  682.  
  683.        example: IF CSR (25,1,25,80) TEMP
  684.        If the mouse/keyboard moves the screen cursor to the bottom
  685.        row (25), then program execution will continue at label TEMP.
  686.  
  687.        IF KEY key label
  688.        IF NOT KEY key label
  689.  
  690.        When the user presses a key (or a mouse button), the ShowText system
  691.        generates three things: a KEY (0 to 255) value , a ROW CLICK
  692.        (row 1 to 25) value and an COLUMN CLICK (column 1 to 80) value. These
  693.        values are placed in a 63 byte circular (first-in-first-out) buffer.
  694.        The O-N-L-Y way to make these values available to the program is to
  695.        execute a WAITKEY command.  The WAITKEY command retrieves the next
  696.        character in the keyclick buffer.  If no user input is waiting then
  697.        KEY=0 (NULL), ROW CLICK=0 and COLUMN CLICK=0.
  698.  
  699.        The IF KEY and IF NOT KEY commands will test the KEY value for a match.
  700.        The first form (IF KEY) will execute a GOTO label if the KEY value
  701.        matches its test value.  The second form (IF NOT KEY) will execute a
  702.        GOTO label if the KEY value does not match its test value. Note that
  703.        the arrow-keys (up,down,left,right) can NOT be trapped.
  704.  
  705.        e.g.  IF KEY ESC TEST would GOTO TEST if the last key was an escape.
  706.              IF NOT KEY NULL TEST would GOTO TEST if any key was pressed.
  707.  
  708.        other valid examples include:
  709.  
  710.        IF KEY ALT F1 TEST       (note that ALT CTRL SHIFT can be used but
  711.        IF KEY CTRL F1 TEST       not in the same statement)
  712.        IF KEY SHIFT F1 TEST
  713.        IF KEY SPACE TEST
  714.        IF KEY A TEST   (note: keyboard input is tested as capitalized (a=A) )
  715.        IF KEY 7 TEST
  716.        IF KEY $ TEST
  717. ----------------------------------------------------------------------------
  718.        IF Tn >= seconds label
  719.        IF Tn < seconds label
  720.  
  721.        where n=0 to 15
  722.        where seconds is a number between 0 and 3600 seconds
  723.  
  724.        These instructions check the specifed 16 bit timer to determine how
  725.        much time (in seconds) has elapsed since the last RST Tn was
  726.        executed.  The [ IF Tn >= ] will execute a GOTO label if the timer
  727.        value equals or exceeds the seconds value.  The [ IF Tn < ] will
  728.        execute a GOTO label if the timer value is less than the seconds value.
  729.        If the timer itself is allowed to exceed 3600.8 (which is a little more
  730.        than 1 hour ), the timer value is maintained at 3600.8 seconds (which
  731.        is internally expressed as 65535/18.2).  The resolution is about
  732.        1/18.2 of a second.  There are sixteen of these 16-bit timers available.
  733.        example:          RST T2           \ ' resets timer#2 to 0
  734.                  :LOOP \ IF T2 < 4.5 LOOP \ ' stays in loop for 4.5 seconds
  735.  
  736.        IF var <  val label
  737.        IF var <= val label
  738.        IF var <> val label
  739.        IF var =  val label
  740.        IF var >  val label
  741.        IF var >= val label
  742.  
  743.        These instructions test the variable (var) with the specified value 
  744.       (val).  A GOTO label is executed if the condition is true.
  745.  
  746.        example:  IF V1 <= V2 TEMP
  747.                  would go to label TEMP if V1 is less than or equal to V2
  748.  
  749.                  IF %ABC = %XYZ+2 TEST
  750.                  would go to label TEST if variable %ABC is equal to (%XYZ + 2)
  751. --------------------------------------------------------------------------------
  752.        IF var label      'GOTO label if var is non-zero
  753.        IF NOT var label  'GOTO label if var is zero
  754. --------------------------------------------------------------------------------
  755.       *See the special note about IF statements in the PROGRAMMING CONVENTIONS
  756.        section near the beginning of this document.
  757.  
  758.        INPUT TEXT (row, startingcolumn, endingcolumn, attribute)
  759.        INPUT TEXT CAPS (row, startingcolumn, endingcolumn, attribute)
  760.        INPUT var  (row, startingcolumn, endingcolumn, attribute)
  761.  
  762.        The INPUT TEXT instruction allows the user to type a string of text
  763.        on the screen.  An edit-window is opened on the screen on the specified
  764.        row and between startingcolumn and endingcolumn.  NO error checking is
  765.        done on the coordinates.  Do NOT allow the input field to wrap around
  766.        to the next screen row ! The color of the input text is determined by 
  767.        the attribute value (see ATTR command).
  768.        Note: The default screen cursor/colors are not changed by this command.
  769.        The text can be upper or lower case but if the CAPS keyword appears in
  770.        the command, the text will be capitalized when the input is finished.
  771.        This text is only placed on the screen, but BCOPY can be used to
  772.        move it to a buffer.  The left-arrow, right-arrow and backspace are the
  773.        editing keys.  The Enter and Escape keys will terminate the text input
  774.        routine.  It is possible to use var=[K] to find out which key
  775.        terminated the routine (Enter=13 or Escape=27).  The var=[.C]
  776.        command will return the column position of the rightmost non-space
  777.        character in the input text field.  All type-ahead is cancelled prior
  778.        to executing INPUT TEXT.
  779.        The INPUT var command is identical except that the text string is 
  780.        converted to a number which is then placed in the specified variable.
  781.        Note that non-numeric characters in the text field are actually ignored.
  782.        The number must be in the range 0 to 255 or else the specified variable
  783.        will contain 0 (zero) and the EXTRA [X] variable will contain 255.
  784.  
  785.        INPUT TEXT (1,10,20,31) would input white/blue text on
  786.                                row 1 between columns 10 and 20 (mixed-case)
  787.        INPUT TEXT CAPS (1,10,20,31) would input white/blue text on
  788.                                     row 1 between columns 10 and 20 and then
  789.                                     would capitalize it on-screen
  790.        INPUT V1 (1,10,20,31) would input a numeric value using white/blue text
  791.                              on row 1 between columns 10 and 20
  792.  
  793.        Note: The screensaver function will not operate during the INPUT TEXT 
  794.              function. You may substitute a question mark (?) for INPUT.
  795.                        ?TEXT (row, startingcolumn, endingcolumn, attribute)
  796.                        ?TEXT CAPS (row, startingcolumn, endingcolumn, attribute)
  797.                        ?var (row, startingcolumn, endingcolumn, attribute)
  798. --------------------------------------------------------------------------------
  799.        MEM PEEK offset var
  800.  
  801.        This instruction will look at the PC's lowest 64k memory segment
  802.        0000:offset and will place the value in the variable (var). This
  803.        is useful for checking keyboard shift status, video mode etc.
  804.        For example, MEM PEEK 1047 V1 would place the keyboard shift status
  805.        in variable V1 where the binary weight of each bit is as follows:
  806.           1 = right Shift pressed          16 = Scroll-Lock ON
  807.           2 = left Shift pressed           32 = Num-Lock ON
  808.           4 = Ctrl key pressed             64 = Caps-Lock ON
  809.           8 = Alt key pressed             128 = Insert mode ON
  810.  
  811.        LEFT MOUSE key
  812.        CENTER MOUSE key
  813.        RIGHT MOUSE key
  814.  
  815.        These instructions will specify which keycode is sent to the program
  816.        when a mouse button is pressed.  The default is SPACE (code=32).
  817.  
  818.        e.g.  LEFT MOUSE ENTER
  819.              RIGHT MOUSE ESC
  820.  
  821.        SPECIAL NOTE:
  822.        When running an application, which has been developed using the
  823.        ShowText system, the mouse sensitivity can be adjusted by pressing
  824.        Shift and Ctrl at the same time.  The default sensitivity is set for
  825.        a 200 dpi mouse.
  826. ----------------------------------------------------------------------------
  827.        ON INTKEYn key GOSUB label
  828.        ON INTKEYn key GOTO label
  829.  
  830.        where n can be 0 to 7 and key is a specified key code
  831.  
  832.        These instructions allow the programmer to specify up to 8 critical
  833.        keys that the program should watch for.  The specified action is taken
  834.        regardless of what the program was doing (like an interrupt).  An 
  835.        example might include a system-wide help screen or exit function.
  836.        NOTE: When an interrupt key is pressed, the current keyclick values
  837.        (KEY,ROW CLICK and COLUMN CLICK) are NOT overwritten by the interrupt
  838.        key's keyclick values.  You may use the IF CSR to access the current
  839.        screen-cursor values.
  840.  
  841.        e.g.  ON INTKEY0 CTRL C GOTO QUIT
  842.              ON INTKEY1 F1 GOSUB HELP
  843.              ∙
  844.              ∙ (other statements)
  845.              ∙
  846.             :HELP 
  847.              ∙
  848.              ∙ (other statements)
  849.              ∙
  850.              RETURN
  851.              ∙
  852.             :QUIT \ C@1,1 \ EXIT
  853.  
  854.         When using the GOSUB option, it is a good idea to save the screen
  855.         to a safe place like internal buffer 63 and then restore it prior
  856.         to executing a RETURN.  The current screen-cursor and print-cursor
  857.         values should also be saved (to variables) and restored if they are
  858.         changed inside the subroutine.  The command ON INTKEYn NULL will
  859.         effectively disable an interrupt key.  It can enabled again later.
  860.  
  861.        ON var GOTO label1,label2,label3,label4
  862.        ON var GOSUB label1,label2,label3,label4
  863.  
  864.        These instructions will take the appropriate action (GOTO or GOSUB)
  865.        based on the value of the variable (var).
  866.  
  867.        For example,
  868.        ON V1 GOTO FIRST,SECOND,THIRD
  869.        If the variable V1=1 then the program would GOTO FIRST
  870.        If the variable V1=2 then the program would GOTO SECOND
  871.        If the variable V1=3 then the program would GOTO THIRD etc.
  872.        If the variable is equal to zero or the variable is greater than
  873.        the number of labels, then program execution will resume at the
  874.        statement following the (ON var GOTO) or (ON var GOSUB ).
  875.        The ON GOSUB is similar but it places the return address (of the
  876.        statement following the ON GOSUB) onto the stack.  This allows the
  877.        subroutine's RETURN (or RET) statement to operate properly.
  878.        The maximum number of labels per line is 63.
  879. --------------------------------------------------------------------------------
  880.        P@ row,column
  881.  
  882.        This instruction locates the print cursor at the specified row 
  883.        (1 to 25) and column (1 to 80).  For example, P@12,40 would locate
  884.        the print cursor at row 12 and column 40.  This determines where
  885.        the next print statement will start.  see: PCSR LIM below
  886. -------------------------------------------------------------------------------
  887.        PCSR LIM (top_row , leftmost_column , bottom_row , rightmost_column)
  888.        PCSR LIM
  889.  
  890.        The first form, with operands, sets the limits on the print cursor
  891.        location and the second form, with no operands, restores the limits 
  892.        to include the entire screen.  Note: This means that printing can only
  893.        occur within the specified limits.
  894.        ex: WINDOW (15,35,25,65) 32 \ PCSR LIM (15,35,25,65)
  895.            'this would force the cursor to stay inside the window
  896.            'upper-left (row=15,column=35) and lower-right (row=25,column=65)
  897. -------------------------------------------------------------------------------
  898.        PEEK buffer (row,column) ASCII var
  899.        PEEK buffer (row,column) ATTR var
  900.        PEEK buffer (row,column) var var
  901.  
  902.        POKE buffer (row,column) ASCII val
  903.        POKE buffer (row,column) ATTR val
  904.        POKE buffer (row,column) val val
  905.  
  906.        These instructions will allow the program to read (PEEK) or write
  907.        (POKE) from/to the specified buffer at the location (row,column).
  908.        Using the ASCII keyword would involve only the character code while
  909.        using the ATTR keyword would involve only the color attribute.  Using
  910.        (var var) or (val val) would specify both the ASCII code and the color
  911.        attribute would be used (in that order).      
  912.  
  913.        ex: PEEK 0 (25,80) V1 V2 would read the screen at (row=25,column=80)
  914.                                 and would put its ASCII value in V1 while
  915.                                 placing its color attribute value in V2.
  916.  
  917.        PLAY "text..."
  918.  
  919.        This instruction 'plays' the specified musical commands through the
  920.        PC's internal speaker.  A summary of PLAY commands is listed below.
  921.  
  922.       < or >  Up or down one octave
  923.       A-G  Plays A, B, ..., G in current
  924.            octave (+ = sharp, - = flat)
  925.       Ln  Sets length of a note (L1 is
  926.           whole note, L4 is quarter note,
  927.           etc.)  n = 1-64
  928.       ML  Each note plays full length
  929.       MN  Each note plays 7/8 of length
  930.       MS  Each note plays 3/4 of length
  931.       Nn  Plays note n (n = 0-84, 0 is a
  932.           rest)
  933.       On  Sets current octave (n = 0-6)
  934.       Pn  Pause for the duration of
  935.           n quarternotes (n = 1-64)
  936.       Tn  Sets number of quarter notes per
  937.           minute (n = 32-255, 120 default
  938.  
  939.       e.g. PLAY "O3CDEFGAB"
  940.       Please see the special note about the string $(buf,row,col,col) in the
  941.       section labeled programming tricks and tips.
  942. ----------------------------------------------------------------------------
  943.        PORT IN port var
  944.        This instruction reads values from the specified I/O port into the
  945.        variable (var).  ex: PORT IN 512 V1  read port number 512 into V1
  946.  
  947.        PRINT "text........."
  948.        prints the text at the current location of the print-cursor
  949.  
  950.        PRINT CHAR(val)
  951.        prints the ASCII character whose ASCII code is specified in val.
  952.  
  953.        PRINT var,format
  954.        print the specified variable according to the specified format
  955.        (characters in format= 1 to 9  L  Z  O  Q)
  956.        1 to 9 specifies the width of the field (printing 255 would use 3)
  957.        L means left-justify (if L is not specified the default is right-justify)
  958.        Z means to pad the field (left-side) with zeros when printing a small #.
  959.        O or Q means to replace that (reprehensible) slashed-zero with the
  960.               letter O.
  961.        ex: PRINT V1,3Q would print V1 right-justified in a 3-column field with
  962.                        all zeros replaced by the letter O.
  963.  
  964.        TTYPE "text......"
  965.        is the same as print but it has a slight delay between characters
  966.        like the old teletype machines. This only works for a text string.
  967.  
  968.        Note: If a semi-colon (;) is placed at the end of the line, it will
  969.              leave the print cursor at that position rather than simulate
  970.              a <cr><lf> (carriage∙return-line∙feed). e.g PRINT "ABC";
  971.              This is true for all of the PRINT/TTYPE commands.
  972.              Please see the special note about the string $(buf,row,col,col)
  973.              in the section labeled programming tricks and tips.
  974.              The exclamation mark (!) can be used in place of PRINT while (!!)
  975.              can be used in place of TTYPE.   e.g.  ! "text"  or  !! "text"
  976. ----------------------------------------------------------------------------
  977.        PUSH variablelist
  978.        POP  variablelist
  979.  
  980.        These instructions PUSH/POP variables on/off the variable stack. (Note
  981.        that the variable stack is different from the instruction stack used
  982.        by the GOSUB/RET/RST S instructions).  The variable list can be 
  983.        specified in a number of ways. Some examples will show how it works.
  984.  
  985.        PUSH 1,2,3 is the same as PUSH V1,V2,V3. (The letter V is optional here)
  986.  
  987.        PUSH 1,5-7,9-12 which is the same as PUSH 1,5,6,7,9,10,11,12 should be
  988.                        followed later in the program by:
  989.        POP 12-9,7-5,1  because values are POPped off the variable stack in the
  990.                        opposite order in which they were PUSHed onto the stack.
  991.  
  992.        These instructions allow subroutines to push variables onto the stack,
  993.        then use them in any routines, then pop the original values back into
  994.        the appropriate variables.  Be sure not to push too many variables onto
  995.        the stack at any given time because the stack is only 1024 bytes long.
  996.        e.g. PUSH 0-255\PUSH 0-255\PUSH 0-255\PUSH 0-255 would just fill up the
  997.             variable stack.  Note that PUSH 0-4 uses less program memory than
  998.             PUSH 0,1,2,3,4, so PUSHing/POPping a contiguous range of subscripts
  999.             will be more efficient than a scattered group of subscripts.
  1000.        If you PUSH too many values onto the stack, an error message will be
  1001.        generated.  If you try to POP a value off the stack when there are no
  1002.        values on the stack, the destination target variable will remain 
  1003.        unchanged and no error message will be given.
  1004.  
  1005.        RST KEYCLK  ( or  RST K)
  1006.  
  1007.        This instruction clears the entire 63 byte keyclick buffer and also
  1008.        clears the PC's keyboard buffer.  This allows the program to cancel
  1009.        any type-ahead before executing a particular routine.
  1010. ----------------------------------------------------------------------------
  1011.        RST STACK  ( or RST S)
  1012.  
  1013.        This instruction pops one (RETURN) value off the stack.  This allows
  1014.        a subroutine to return to a different address than the one which called
  1015.        it.  e.g.  RST STACK \ GOTO OTHER
  1016. ----------------------------------------------------------------------------
  1017.        RST T              reset timer number 0
  1018.        RST Tn             reset timer number n (where n=0 to 15)
  1019.        RST TS             reset all timerS
  1020.  
  1021.        This instruction resets the specified 16 bit-timer to zero.  The timers
  1022.        have a range of 0 to 3600 seconds and measure the time since the last
  1023.        RST Tn instruction was executed.
  1024.        example: RST TS    would reset ALL 16 timers to zero
  1025.                 RST T15   would reset timer#15 to zero
  1026. ----------------------------------------------------------------------------
  1027.        RESTART
  1028.  
  1029.        This instruction simply restarts the current program with all variables
  1030.        reset to zero.
  1031. ----------------------------------------------------------------------------
  1032.        SAVE
  1033.        Saves the current visible screen in the special buffer area.
  1034.  
  1035.        RESTORE fade 
  1036.        Restores the screen from the special buffer area (with an optional fade).
  1037.  
  1038.        Note: Only these two commands can access this special buffer.
  1039.        This is useful before and after a (WINDOW / user input) routine.
  1040.        ex: SAVE \ CLS \ RESTORE 1  would save-screen, clear-screen then
  1041.                                    restore-screen with the FIZZ fade.
  1042. ----------------------------------------------------------------------------
  1043.        SCREENSAVER val
  1044.  
  1045.        This instruction implements a screensaver function which is invoked
  1046.        when no key/mouse buttons are pressed for the specified time (in
  1047.        minutes).  The screensaver is disabled if the value (val) is zero.
  1048.        Interactive programs would probably benefit from the use of this
  1049.        function while constantly-running demo programs which require no user
  1050.        input would probably not need it.
  1051.        ex: SCREENSAVER 1 would active screen-saver after 1 minute of 
  1052.            mouse/keyboard inactivity
  1053. ----------------------------------------------------------------------------
  1054.        SCROLL UP (row1,col1,row2,col2)
  1055.        SCROLL DOWN (row1,col1,row2,col2)
  1056.  
  1057.        These instructions will cause the text inside the block at
  1058.        (upper-left=row1,col1  lower-right=row2,col2) to scroll one line
  1059.        in the specified direction.  The resultant blank line will be shown in
  1060.        the default foreground/background color.
  1061.        ex: SCROLL UP (1,1,25,80) would scroll entire screen up
  1062.  
  1063.        SELECT CASE test_expression
  1064.           ∙∙∙
  1065.           ∙∙∙statements_block1
  1066.           ∙∙∙
  1067.        CASE case_expression{,case_expression...}
  1068.           ∙∙∙
  1069.           ∙∙∙statements_block2
  1070.           ∙∙∙
  1071.        CASE ELSE
  1072.           ∙∙∙
  1073.           ∙∙∙statements_block3
  1074.           ∙∙∙
  1075.        END SELECT
  1076.  
  1077.        This group of instructions will allow your program to execute specific
  1078.        blocks of code depending upon the relationship between the 
  1079.        test_expression and the case_expression(s).  The SELECT CASE statement
  1080.        establishes the value against which all of the case_expressions are
  1081.        compared.  The test_expression and case_expression(s) can be any
  1082.        mathematical expressions.  In addition, the case_expression can also
  1083.        be in the form  value1 TO value2 (e.g. 4 TO 5 )(note: value1 must be 
  1084.        less than value2).  It can also be in the form  {relational_operator}
  1085.        value (e.g. <5).  More than one case expression can be placed on a
  1086.        line by separating them with a comma.  The CASE ELSE statement is used
  1087.        to handle any conditions not covered by previous CASE statements.  Note
  1088.        that the CASE ELSE statement is optional.
  1089.  
  1090.        Example 1
  1091.        %j=4 \ for %i=1 to 10
  1092.        SELECT CASE %i  'could also have been a mathematical expression
  1093.             print "statements before first case are always executed"
  1094.        CASE 1
  1095.             print "it was a 1"
  1096.        CASE 2 TO 3,>=9
  1097.             print "it was either 2,3,9 or 10"
  1098.        CASE %j+2,%j*2
  1099.             print "it was a 6 or an 8"
  1100.        CASE ELSE
  1101.             print "if all else fails it was 4,5 or 7"
  1102.        END SELECT       
  1103.  
  1104.        Example 2 (note that CASE ELSE is not used)
  1105.        for %i=1 to 10
  1106.        SELECT CASE %i AND 1
  1107.        print %i,3q;
  1108.        CASE 0 \ print " is an even number"
  1109.        CASE 1 \ print " is an odd number"
  1110.        END SELECT
  1111.  
  1112.        System Variables - (  be sure to use the square brackets  [ ]   )
  1113.        [info] returns the specified information where [info] can be:
  1114.  
  1115.        [RANDOM num1 TO num2]
  1116.        returns a random number within the range num1 to num2.
  1117.        Note: Num1 and Num2 are numbers (0 to 255) and cannot be variables.
  1118.  
  1119.        [X]     (the EXTRA variable used in most arithmetic operations)
  1120.        [OVR]   (the OVERFLOW variable  =255 if overflow    =0 if no overflow)
  1121.                 this variable can only be reset to 0 by reading it 
  1122.                 e.g.  if [OVR] quit
  1123.               
  1124.        -----------------Keyclick Values----------------------------------------
  1125.        [K]     ( most recent keyclick KEY value)
  1126.        [KC]    ( most recent keyclick KEY value (capitalized) )
  1127.        [.R]    ( most recent keyclick row value)
  1128.        [.C]    ( most recent keyclick column value)
  1129.        [.AS]   ( ASCII value of the character located on-the-screen
  1130.                 at the most recent keyclick row,column coordinates)
  1131.        [.AT]   ( ATTRIBUTE value of the character located
  1132.                 on-the-screen at the most recent keyclick row,col coordinates)
  1133.        [.F]    ( foreground color value of the character located
  1134.                 on-the-screen at the most recent keyclick row,col coordinates)
  1135.        [.B]    ( background color value of the character located
  1136.                 on-the-screen at the most recent keyclick row,col coordinates)
  1137.                 --note-- [.AS] [.AT] [.F] [.B] are always determined from
  1138.                          the visible screen regardless of the VIRTUAL setting.
  1139.  
  1140.        -----------------Screen Cursor Values-----------------------------------
  1141.        [CV]    ( visual status of the cursor 0=OFF and 255=ON)
  1142.        [R.]    ( row on which the cursor currently resides)
  1143.        [C.]    ( column on which the cursor currently resides)
  1144.        [AS.]   ( ASCII value of the character located on-the-screen
  1145.                 at the current cursor row,column coordinates)
  1146.        [AT.]   ( ATTRIBUTE value of the character located
  1147.                 on-the-screen at the current cursor row,col coordinates)
  1148.        [F.]    ( foreground color value of the character located
  1149.                 on-the-screen at the current cursor row,col coordinates)
  1150.        [B.]    ( background color value of the character located
  1151.                 on-the-screen at the current cursor row,col coordinates)
  1152.                 --note-- [AS.] [AT.] [F.] [B.] are always determined from
  1153.                          the visible screen regardless of the VIRTUAL setting.
  1154.        [-R.]     minimum cursor row value────┐ 
  1155.        [+R.]     maximum cursor row value    ├─set by the last
  1156.        [-C.]     minimum cursor column value │ CSR LIM  
  1157.        [+C.]     maximum cursor column value─┘ command executed
  1158.              
  1159.        -----------------Print Cursor Values------------------------------------
  1160.        [R;]    ( row on which the print-cursor currently resides)
  1161.        [C;]    ( column on which the print-cursor currently resides)
  1162.        [AT;]   ( current foreground/background attribute byte) for printing
  1163.        [F;]    ( current foreground color 0 to 31) for printing
  1164.        [B;]    ( current background color 0 to 7)  for printing
  1165.        [-R;]     minimum print cursor row value────┐ 
  1166.        [+R;]     maximum print cursor row value    ├─set by the last
  1167.        [-C;]     minimum print cursor column value │ PCSR LIM  
  1168.        [+C;]     maximum print cursor column value─┘ command executed
  1169.  
  1170.        System variables - continued
  1171.  
  1172.        [VIRT]  returns the current virtual buffer number (last set by VIRTUAL)
  1173.                (i.e. where CLS, PRINT, COPY (%buffer,0) etc. are performed)
  1174.                if =0 then printing goes to visible screen (virtual mode is off)
  1175.                if<>0 then printing goes to specified buffer (virtual mode is on)
  1176.  
  1177.        [M?]    255 if mouse present    0 if no mouse was found
  1178.        [MB]    255 if any mouse button pressed         0 otherwise
  1179.        [ML]    255 if left mouse button pressed        0 otherwise
  1180.        [MR]    255 if right mouse button pressed       0 otherwise
  1181.        [MC]    255 if center mouse button pressed      0 otherwise
  1182.  
  1183.        [JAX]   joystick A analog (X) value (0 to 255)
  1184.        [JAY]   joystick A analog (Y) value (0 to 255)
  1185.        [JBX]   joystick B analog (X) value (0 to 255)
  1186.        [JBY]   joystick B analog (Y) value (0 to 255)
  1187.        [JAF]   255 if joystick A fire button pressed ( 0 otherwise)
  1188.        [JAB]   255 if joystick A base button pressed ( 0 otherwise)
  1189.        [JBF]   255 if joystick B fire button pressed ( 0 otherwise)
  1190.        [JBB]   255 if joystick B base button pressed ( 0 otherwise)
  1191.  
  1192.        [Tn]    (returns the least significant 8 bits of the specified 16 bit
  1193.                timer's value while the most significant 8 bits are placed in
  1194.                the EXTRA variable)  (n=0 to 15)  e.g. V2=[T0] \ V3=[X]
  1195.                (Note: These values are in clock-ticks and are NOT in seconds)
  1196.                       There are approximately 18.2 clock-ticks in one second.
  1197.        [RND]   with no arguments - returns a random number between 0 and 255
  1198.        [STK]   ( instruction stack pointer i.e. level of subroutine)
  1199.        [ERL]   ( current DOS ERRORLEVEL value)
  1200.      ┌────────────────────────────────────────────────────────────────────┐
  1201.      │   The following values are available on AT class PCs with CMOS RAM │
  1202.      │ [YR]   ( tens of years e.g. 1995 would return 95)                  │
  1203.      │ [MON]  ( current month 1 to 12)                                    │
  1204.      │ [DAY]  ( current day 1 to 31)                                      │
  1205.      │ [HR]   ( hour in 24 hr format eg. 1 pm = 13)                       │
  1206.      │ [MIN]  ( minutes e.g. 12:34 = 34 )                                 │
  1207.      │ [SEC]  ( seconds eg. 12:34:56 = 56 )                               │
  1208.      └────────────────────────────────────────────────────────────────────┘
  1209.  
  1210.        [.row1:column1:row2:column2] is 225 if last click was in "box"
  1211.                                     is 0 if not
  1212.  
  1213.        [row1:column1:row2:column2.] is 225 if cursor is currently in "box"
  1214.                                     is 0 if not
  1215.  
  1216.        [AS:buf:row:col]  returns the AScii value of the character located
  1217.                          in buffer "buf" at the specified row and column
  1218.    
  1219.        [AT:buf:row:col]  returns the ATtribute-byte value of the character
  1220.                          located in buffer "buf" at the specified row and column
  1221.    
  1222.    >>> Note the use of colons (:) instead of commas (,) in these four
  1223.        system variables.  This makes parsing of the command line more
  1224.        straightforward.
  1225.  
  1226.        ex: V0=[K] places the most recent keyclick value into V0
  1227.  
  1228.        var=val
  1229.        var++          (increment var by 1)  ex: V7++ is the same as V7=V7+1
  1230.        var--          (decrement var by 1)  ex: V7-- is the same as V7=V7-1
  1231.        var=val^val    (exponentiation)
  1232.        var=val*val    (multiplication)
  1233.        var=val/val    (division)
  1234.        var=val{val    (modulo division - returns the remainder of val/val)
  1235.        var=val+val    (addition)
  1236.        var=val-val    (subtraction)
  1237.        var=val<val    (less than)----------------always 0(false) or 255(true)
  1238.        var=val=val    (equal to)-----------------always 0(false) or 255(true)
  1239.        var=val>val    (greater than)-------------always 0(false) or 255(true)
  1240.        var=val<=val   (less than or equal to)----always 0(false) or 255(true)
  1241.        var=val<>val   (not equal to)-------------always 0(false) or 255(true)
  1242.        var=val>=val   (greater than or equal to)-always 0(false) or 255(true)
  1243.        var=`val       (same as var= NOT val)     note:symbol is ascii 96
  1244.        var=val&val    (same as var=val AND val)
  1245.        var=val@val    (same as var=val OR val)
  1246.        var=val#val    (same as var=val XOR val)
  1247.        var=val_val    (same as var=val NAND val)    also var=NOT(val AND val)
  1248.        var=val|val    (same as var=val NOR val)     also var=NOT(val OR val)
  1249.        var=val~val    (same as var=val XNOR val)    also var=NOT(val XOR val)
  1250.  
  1251.        var is a variable (V0 to V255) or an indexed variable (VV0 to VV255).
  1252.        val can also be a variable, an indexed variable or a number (0 to 255).
  1253.        A variable is similar to an array element. V0 to V255 is similar to
  1254.        V(0) to V(255) in some other languages.  An indexed variable uses the
  1255.        contents of another variable as an index. VV0 to VV255 is similar to
  1256.        V(V(0)) to V(V(255)).  There are still only 256 variables in the 
  1257.        system.  Indexing only allows more options for the programmer. 
  1258.  
  1259.        These instructions perform the specified (integer) math operation.
  1260.        The variables have unsigned 8-bit values which means that they may
  1261.        only contain numbers from 0 to 255.  The AND,OR and XOR are bitwise
  1262.        logic instructions.  The EXTRA variable [X] is used to hold the overflow
  1263.        and underflow of the math operations.  The overflow variable [OVR] is
  1264.        set to 255 if ANY math over/underflow occurs.  OVR is reset to zero 
  1265.        ONLY when it is read.
  1266.  
  1267.        Notes:
  1268.        These instructions can be embedded in normal instructions.
  1269.        e.g.  %A = (%B + 45) * ((%C + 1) / 4)
  1270.        The EXTRA variable's value is set by the LAST math operation performed.
  1271.        If you use the literal AND,OR,XOR forms instead of the &,@,# forms, then
  1272.        you M-U-S-T include a space on either side of the word.  This allows the
  1273.        command parser to function properly.
  1274.        Example: %Temp = %Misc OR %Other  'correct
  1275.                 %Temp = %MiscOR%Other    'incorrect - use  %Temp = %Misc@%Other
  1276.        The order of execution of mathematical operations is:
  1277.            1st - parentheses         ( )
  1278.            2nd - exponentiation       ^
  1279.            3rd - multiplication       *
  1280.            4th - division and modulo  /   {
  1281.            5th - add  subtract        +   -
  1282.            6th - relational           <   =   >   <=   <>   >=
  1283.            7th - logical NOT          `
  1284.            8th - logical              &   @   #    _    |    ~
  1285.  
  1286.        VIRTUAL val
  1287.  
  1288.        Sets the address used by buffer 0 to the specified buffer's address.
  1289.        For example, VIRTUAL 2 means that CLS, PRINT, COPY(4,0) etc. would
  1290.        perform their actions on buffer 2 instead of on the visible screen.
  1291.        VIRTUAL 0 would change the address of buffer 0 to the visible screen.
  1292. ----------------------------------------------------------------------------
  1293.        WAIT seconds
  1294.  
  1295.        where seconds is 0 to 3600.8 seconds and represents how long the
  1296.        program should wait. ex: WAIT 2 would pause program for two seconds
  1297. ----------------------------------------------------------------------------
  1298.        WAITKEY seconds
  1299.        WAITKEY seconds,label
  1300.        WAITKEY
  1301.  
  1302.        where seconds is 0 to 3600 seconds and represents how long the
  1303.        program should wait for a key/mouse button press.
  1304.        ex: WAITKEY 10,TOOLATE would retrieve a keyclick pressed within
  1305.            ten seconds and then continue execution at the next statement,
  1306.            otherwise if no key/mouse is pressed within ten seconds a
  1307.            GOTO TOOLATE would be executed.
  1308.  
  1309.        When the user presses a key (or a mouse button), the ShowText system
  1310.        generates three things: a KEY (0 to 255) value , a ROW CLICK
  1311.        (row 1 to 25) value and a COLUMN CLICK (column 1 to 80) value.  These
  1312.        values are placed in a 63 byte circular (first-in-first-out) buffer.
  1313.        The O-N-L-Y way to make these values available to the program is to
  1314.        execute a WAITKEY command.  The WAITKEY command retrieves the next
  1315.        character in the keyclick buffer.  If no user input is waiting then
  1316.        KEY=0 (NULL), ROW CLICK=0 and COLUMN CLICK=0. 
  1317.  
  1318.        The first form of the instruction will cause execution to continue at
  1319.        the statement following the WAITKEY statement whenever a key/mouse
  1320.        button is pressed or when the time interval has expired.
  1321.        The second form of the instruction will cause execution to continue at
  1322.        the statement following the WAITKEY statement only if a key/mouse button
  1323.        is pressed.  If the time interval expires before a key/mouse button is
  1324.        pressed, execution continues at the specified label (like GOTO label).
  1325.        The third form waits indefinitely for a key/mouse-press then continues.
  1326.  
  1327.        WHILE condition
  1328.        ∙∙∙
  1329.        ∙∙∙statements∙∙∙
  1330.        ∙∙∙
  1331.        WEND
  1332.  
  1333.        The WHILE-loop is performed as long as the condition is true.  For
  1334.        example, the following program will print the numbers 1 through 5.
  1335.  
  1336.          %I=1
  1337.          WHILE %I<=5
  1338.          PRINT %I,3Q
  1339.          %I++
  1340.          WEND
  1341. ----------------------------------------------------------------------------
  1342.        WINDOW (row1,col1,row2,col2) val
  1343.  
  1344.        This instruction will draw a window (with the current colors) between
  1345.        the upper-left (row1,col1) and the lower-right (row2,col2) positions
  1346.        on the screen. The interior of the window is painted with current colors.
  1347.        Text may then be inserted inside the window with the print statement etc.
  1348.        The value (val) specifies a window type and may be a number or variable.
  1349.            window       ┌───┐   ╒═══╕   ╓───╖    ╔═══╗
  1350.            types:       │100│   │101│   ║102║    ║103║    Type 104=MARQUEE
  1351.                         └───┘   ╘═══╛   ╙───╜    ╚═══╝
  1352.        ex: WINDOW (1,1,25,80) 100 places single-line window around entire screen
  1353.        NOTE: Type 104 generates a "marquee" around the specified box in low
  1354.        intensity current colors.  This type of window differs from all others
  1355.        because the inside of the box is "clear" (i.e. it is not painted over
  1356.        by this instruction and can be followed by a BFILL instruction).
  1357.        Values outside the range of 100 to 104 will place the ASCII character
  1358.        code (val) around the perimeter of the window.  See TIPS/TRICKS section.
  1359. ----------------------------------------------------------------------------
  1360.        XFLOAD "filename.ext"
  1361.        XFSAVE "filename.ext"
  1362.  
  1363.        These two instructions ( XFLOAD - e<X>ternal <F>ile <LOAD> and
  1364.        XFSAVE - e<X>ternal <F>ile <SAVE> ) allow your program to
  1365.        load-screen-from/save-screen-to external files.  These files are always
  1366.        4000-byte screen images like the .SCN file format sometimes used with
  1367.        the ShowText drawing program (STD.EXE).  The extension MUST be specified
  1368.        with these instructions, because there is no assumed default extension.
  1369.        These files are NOT imbedded into the .EXE at compile time as the
  1370.        files used with the COPY command are.  The screen (buffer 0) is the
  1371.        default source/destination, but you can use the VIRTUAL command to
  1372.        temporarily point to another buffer as the source for XFSAVE or the
  1373.        destination for XFLOAD.  Please note that NO errors are reported if
  1374.        these operations fail for any reason.  A typical use for these commands
  1375.        might be to save/load a high-score screen for a game program.
  1376.  
  1377.        NUMERIC KEYCODE VALUES RETURNED BY THE   var=[K]   COMMAND
  1378.  
  1379.             ┌─────┬─────┬─────┬─────┐             ┌─────┬─────┬─────┬─────┐
  1380.        key  │     │SHIFT│ CTRL│ ALT │        key  │     │SHIFT│ CTRL│ ALT │
  1381.     ┌───────┼─────┼─────┼─────┼─────┤     ┌───────┼─────┼─────┼─────┼─────┤
  1382.     │   A   │  65 │  97 │   1 │ 158 │     │  ESC  │  27 │  27 │  27 │  -  │
  1383.     │   B   │  66 │  98 │   2 │ 176 │     │ BKSP  │   8 │   8 │ 127 │  -  │
  1384.     │   C   │  67 │  99 │   3 │ 174 │     │  TAB  │   9 │ 143 │  -  │  -  │
  1385.     │   D   │  68 │ 100 │   4 │ 160 │     │ SPACE │  32 │  32 │  32 │  32 │
  1386.     │   E   │  69 │ 101 │   5 │ 146 │     │ ENTER │  13 │  13 │  10 │  -  │
  1387.     │   F   │  70 │ 102 │   6 │ 161 │     │  F1   │ 187 │ 212 │ 222 │ 232 │
  1388.     │   G   │  71 │ 103 │   7 │ 162 │     │  F2   │ 188 │ 213 │ 223 │ 233 │
  1389.     │   H   │  72 │ 104 │   8 │ 163 │     │  F3   │ 189 │ 214 │ 224 │ 234 │
  1390.     │   I   │  73 │ 105 │   9 │ 151 │     │  F4   │ 190 │ 215 │ 225 │ 235 │
  1391.     │   J   │  74 │ 106 │  10 │ 164 │     │  F5   │ 191 │ 216 │ 226 │ 236 │
  1392.     │   K   │  75 │ 107 │  11 │ 165 │     │  F6   │ 192 │ 217 │ 227 │ 237 │
  1393.     │   L   │  76 │ 108 │  12 │ 166 │     │  F7   │ 193 │ 218 │ 228 │ 238 │
  1394.     │   M   │  77 │ 109 │  13 │ 178 │     │  F8   │ 194 │ 219 │ 229 │ 239 │
  1395.     │   N   │  78 │ 110 │  14 │ 177 │     │  F9   │ 195 │ 220 │ 230 │ 240 │
  1396.     │   O   │  79 │ 111 │  15 │ 152 │     │  F10  │ 196 │ 221 │ 231 │ 241 │
  1397.     │   P   │  80 │ 112 │  16 │ 153 │     │  F11  │  -  │  -  │  -  │  -  │
  1398.     │   Q   │  81 │ 113 │  17 │ 144 │     │  F12  │  -  │  -  │  -  │  -  │
  1399.     │   R   │  82 │ 114 │  18 │ 147 │     │ UP    │ 2OO │ 2OO │  -  │  -  │
  1400.     │   S   │  83 │ 115 │  19 │ 159 │     │ DOWN  │ 2O8 │ 2O8 │  -  │  -  │
  1401.     │   T   │  84 │ 116 │  20 │ 148 │     │ LEFT  │ 2O3 │ 2O3 │ 243 │  -  │
  1402.     │   U   │  85 │ 117 │  21 │ 150 │     │ RIGHT │ 2O5 │ 2O5 │ 244 │  -  │
  1403.     │   V   │  86 │ 118 │  22 │ 175 │     │ INS   │ 210 │ 210 │  -  │  -  │
  1404.     │   W   │  87 │ 119 │  23 │ 145 │     │ DEL   │ 211 │ 211 │  -  │  -  │
  1405.     │   X   │  88 │ 120 │  24 │ 173 │     │ HOME  │ 199 │ 199 │ 247 │  -  │
  1406.     │   Y   │  89 │ 121 │  25 │ 149 │     │ END   │ 207 │ 207 │ 245 │  -  │
  1407.     │   Z   │  90 │ 122 │  26 │ 172 │     │ PGUP  │ 201 │ 201 │ 101 │  -  │
  1408.     │ 0 or )│  48 │  41 │  -  │  -  │     │ PGDN  │ 209 │ 209 │ 246 │  -  │
  1409.     │ 1 or !│  49 │  33 │  -  │ 248 │     │ - or _│  45 │  95 │  31 │  -  │
  1410.     │ 2 or @│  50 │  64 │ 131 │ 249 │     │ + or =│  61 │  43 │  -  │  -  │
  1411.     │ 3 or #│  51 │  35 │  -  │ 250 │     │ | or \│  92 │ 124 │  28 │  -  │
  1412.     │ 4 or $│  52 │  36 │  -  │ 251 │     │ { or [│  91 │ 123 │  27 │  -  │
  1413.     │ 5 or %│  53 │  37 │  -  │ 252 │     │ ] or }│  93 │ 125 │  29 │  -  │
  1414.     │ 6 or ^│  54 │  94 │  30 │ 253 │     │ : or ;│  59 │  58 │  -  │  -  │
  1415.     │ 7 or &│  55 │  38 │  -  │ 254 │     │ " or '│  39 │  34 │  -  │  -  │
  1416.     │ 8 or *│  56 │  42 │  -  │ 255 │     │ < or ,│  44 │  60 │  -  │  -  │
  1417.     │ 9 or (│  57 │  40 │  -  │  -  │     │ > or .│  46 │  62 │  -  │  -  │
  1418.     │ ` or ~│  96 │ 126 │  -  │  -  │     │ ? or /│  47 │  63 │  -  │  -  │
  1419.     └───────┴─────┴─────┴─────┴─────┘     └───────┴─────┴─────┴─────┴─────┘
  1420.  
  1421. ┌──────────────────────────────────────────────────────────────────────────────┐
  1422. │                               SHOWTEXT FADES                                 │
  1423. ├──────────────────┬┬──────────────────┬┬──────────────────┬┬──────────────────┤
  1424. │ O Quick          ││19 Spiral CW In   ││38 Wipe V Close   ││57 Circ Sweep Down│
  1425. │ 1 Fizz           ││2O Spiral CW Out  ││39 Half Wipe V U/D││58 Circ Sweep Up  │
  1426. │ 2 Melt Down      ││21 Spiral CCW In  ││4O Half Wipe V D/U││59 Radar CW       │
  1427. │ 3 Melt Up        ││22 Spiral CCW Out ││41 Half Wipe H L/R││6O Radar CCW      │
  1428. │ 4 Liquid Flow Dn ││23 Mult Sp CW In  ││42 Half Wipe H R/L││61 Louver H Large │
  1429. │ 5 Liquid Flow Up ││24 Mult Sp CW Out ││43 Checker Down   ││62 Louver H Small │
  1430. │ 6 Quarters - CW  ││25 Mult Sp CCW In ││44 Checker Up     ││63 Louver V Large │
  1431. │ 7 Quarters - CCW ││26 Mult Sp CCW Out││45 Diagonal Right ││64 Louver V Small │
  1432. │ 8 Quarters - Alt ││27 Wipe Down      ││46 Diagonal Left  ││                  │
  1433. │ 9 Blks Random Lg ││28 Wipe Up        ││47 Chckr Lvr 1step││                  │
  1434. │1O Blks Random Sm ││29 Wipe Right     ││48 Chckr Lvr 2step││                  │
  1435. │11 Zigzag H Lg Rt ││3O Wipe Left      ││49 Diagonal Lvr R ││                  │
  1436. │12 Zigzag H Lg Lft││31 Curtain H Open ││5O Diagonal Lvr L ││                  │
  1437. │13 Zigzag H Sm Rt ││32 Curtain H Close││51 Page Feed Down ││                  │
  1438. │14 Zigzag H Sm Lft││33 Curtain V Open ││52 Page Feed Up   ││                  │
  1439. │15 Zigzag V Down  ││34 Curtain V Close││53 Page Feed Right││                  │
  1440. │16 Zigzag V Up    ││35 Wipe H Open    ││54 Page Feed Left ││255 selects a     │
  1441. │17 Orifice Open   ││36 Wipe H Close   ││55 Circ Sweep CW  ││    random fade   │
  1442. │18 Orifice Close  ││37 Wipe V Open    ││56 Circ Sweep CCW ││    from this list│
  1443. └──────────────────┴┴──────────────────┴┴──────────────────┴┴──────────────────┘
  1444. Note: The program FADES.EXE will demonstrate each of these fades.
  1445.  
  1446. PROGRAMMING TRICKS AND TIPS
  1447.  
  1448. The following pieces of program code will demonstrate a variety of programming
  1449. principles.  Note that the backslash (\) allows multiple statements on a line.
  1450.  
  1451. 'TO WAIT FOR A KEYSTROKE - NO MATTER HOW LONG IT TAKES
  1452. :CHKIN \ WAITKEY 3600.8,CHKIN
  1453.  
  1454. 'TO EXECUTE A LOOP UNTIL ANY KEY IS PRESSED
  1455. :LOOPIT
  1456. 'any statements here would be executed once during each loop iteration
  1457. WAITKEY 0,LOOPIT
  1458.  
  1459. 'TO EXECUTE A LOOP UNTIL A KEY (OR MOUSE BUTTON) IS PRESSED WHILE THE CURSOR
  1460. 'IS WITHIN THE SPECIFIED BLOCK (WHICH IN THIS CASE IS DEFINED USING VARIABLES)
  1461. :LOOPIT
  1462. 'any statements here would be executed once during each loop iteration
  1463. WAITKEY 0,LOOPIT \ IF NOT CLK(V1,V2,V3,V4)LOOPIT
  1464.  
  1465. 'TO EXECUTE A LOOP UNTIL A NUMBER KEY IS PRESSED (ASCII VALUE 48 TO 57)
  1466. :LOOPNOW
  1467. 'any statements here would be executed once during each loop iteration
  1468. WAITKEY 0,LOOPNOW \ V0=[K] \ IF V0<48 LOOPNOW \ IF V0>57 LOOPNOW
  1469.  
  1470. 'TO BUILD A DEMO PROGRAM USING SCREEN FILES DEMO1.STF,DEMO2.STF,DEMO3.STF
  1471. 'AND DEMO4.STF USING A 3 SECOND DELAY BETWEEN SCREENS (NO FADES) AND ALLOWING
  1472. 'THE PROGRAM TO TERMINATE WHEN THE ESCAPE KEY IS PRESSED
  1473. 'NOTE: THIS PROGRAM USES INTERNAL BUFFERS 1 TO 4. (5 AND 6 ARE NOT USED)
  1474. ON INTKEY0 ESC GOTO QUIT
  1475. COPY(DEMO1,1)\COPY(DEMO2,2)\COPY(DEMO3,3)\COPY(DEMO4,4)
  1476. :START\COPY(1,0)\WAIT 3
  1477.        COPY(2,0)\WAIT 3
  1478.        COPY(3,0)\WAIT 3
  1479.        COPY(4,0)\WAIT 3\GOTO START
  1480. :QUIT\EXITC
  1481.  
  1482. 'TO BUILD A DEMO PROGRAM USING SCREEN FILES DEMO1.STF,DEMO2.STF,DEMO3.STF
  1483. 'AND DEMO4.STF USING A 3 SECOND DELAY BETWEEN SCREENS (NO FADES) AND ALLOWING
  1484. 'THE PROGRAM TO TERMINATE WHEN THE ESCAPE KEY IS PRESSED
  1485. 'NOTE: THIS PROGRAM DOES NOT USE ANY INTERNAL BUFFERS
  1486. '      THIS MEANS MORE DISK ACCESSES ARE NEEDED
  1487. ON INTKEY0 ESC GOTO QUIT
  1488. :START\COPY(DEMO1,0)\WAIT 3
  1489.        COPY(DEMO2,0)\WAIT 3
  1490.        COPY(DEMO3,0)\WAIT 3
  1491.        COPY(DEMO4,0)\WAIT 3\GOTO START
  1492. :QUIT\EXITC
  1493.  
  1494. 'TO PLACE A MARQUEE WINDOW ON THE SCREEN (WITH A MESSAGE)
  1495. COLOR 2,4\WINDOW (11,30,15,50) 104\BFILL 0 (12,31,14,49) ATTR 31
  1496. COLOR 15,1\P@13,35\PRINT "HELLO WORLD"
  1497.  
  1498. PROGRAMMING TRICKS AND TIPS  (continued)
  1499.  
  1500. BUFFER TEXT STRINGS
  1501.  
  1502. There is a special text string which can reside in any of the internal buffers
  1503. (0 to 63) that can be used in place of a quoted string when using PRINT, TTYPE
  1504. PLAY , XFLOAD and XFSAVE.
  1505.  
  1506. The form of the string is $(buf,row,startcolumn,endcolumn)
  1507.  
  1508. where ∙buf is the internal buffer to access (0 to 63)
  1509.       ∙row is the row (1 to 25) where the desired text resides in the buffer
  1510.       ∙startcolumn (1 to 80) and endcolumn (1 to 80) define the starting and
  1511.        ending column location of the text string 
  1512.  
  1513. Note that the information can be specified as numbers, variables (V0 to V255)
  1514. or indexed variables (VV0 to VV255).  If a number greater than 63 is specified,
  1515. the value is ANDed with 63 (to keep the value less than 64).
  1516.  
  1517. For example:
  1518.  
  1519. PRINT $(1,12,35,65) would find the text located in buffer 1 on row 12 starting
  1520.       at column 35 and ending at column 65.  This text would be printed on the
  1521.       screen in the current default color starting at the print cursor location.
  1522.  
  1523. TTYPE $(6,20,1,80) would slow-print the text (in buffer 6, on row 20 between
  1524.                    columns 1 and 80) on the screen.
  1525.  
  1526. PLAY $(4,1,40,60) would play the text string (in buffer 4, on row 1 between
  1527.                   columns 40 and 60).
  1528. ------------------------------------------------------------------------------
  1529. USING BUFFERS AS MEMORY
  1530.  
  1531. The internal buffers (1 to 63) can also be used as memory if the variables
  1532. (V0 to V255) are not enough storage space for data.  This method takes a
  1533. bit more work, but it can be done.  For example,
  1534.  
  1535. POKE 6(1,1)ASCII V2 would store a byte in buffer 6 at row=1, column=1
  1536. PEEK 6(1,1)ASCII V2 would retrieve the previously stored value.
  1537.  
  1538. POKE 6(1,1)ATTR V1 would store a byte in buffer 6 at row=1, column=1
  1539. PEEK 6(1,1)ATTR V1 would retrieve the previously stored value.
  1540.  
  1541. This means that each internal buffer can store 4000 bytes of program data
  1542. because (25 rows x 80 columns) = 2000 bytes. Each row/column position can store
  1543. an ASCII character byte and an ATTRibute byte, therefore 2 x 2000 = 4000 bytes.
  1544.  
  1545. PROGRAMMING TRICKS AND TIPS  (continued)
  1546.  
  1547. The following two listings show how to make a "custom" cursor.  In the first
  1548. example, a white/blue cross-hair symbol (ascii 197) is temporarily placed at
  1549. the cursor location but is replaced by the original character a fraction of a
  1550. second later.  In the second example, the attribute is XORed with 127 to make
  1551. the color "flicker".  Note: Your program should continuously cycle to the
  1552. label (:newcsr) in order to keep redisplaying the custom cursor.
  1553.  
  1554. Example 1.
  1555. :newcsr  %row=[r.] \ %col=[c.] \ csr off
  1556.          peek 0 (%row,%col) %char %attr
  1557.          poke 0 (%row,%col) 197   31    \ wait .09
  1558.          poke 0 (%row,%col) %char %attr \ wait .09 \ waitkey 0,newcsr
  1559.          'you can test key or click values here
  1560.  
  1561. Example 2.
  1562. :newcsr  %row=[r.] \ %col=[c.] \ csr off 
  1563.          peek 0 (%row,%col) attr %attr
  1564.          poke 0 (%row,%col) attr %attr#127 \ wait .09
  1565.          poke 0 (%row,%col) attr %attr     \ wait .09 \ waitkey 0,newcsr
  1566.          'you can test key or click values here
  1567.  
  1568. ##############################################################################
  1569.  
  1570. The following program listing is an alternative to the TEXT INPUT command.
  1571. It is included here in order to further demonstrate the use of ALIASes.
  1572.  
  1573. '------ MAIN PROGRAM ------------------------------------------------------
  1574.         ALIAS %ROW=V200,%COLUMN=V201
  1575.         COLOR 14,1 \ %ROW=10 \ %COLUMN=1 \ GOSUB INPUT
  1576.         EXIT
  1577. '--------------------------------------------------------------------------
  1578. '------ SUBROUTINE --------------------------------------------------------
  1579. :INPUT\ CSR \ C@ %ROW,%COLUMN \ P@ %ROW,%COLUMN \ WAITKEY 0,INPUT
  1580.         IF [K]=13 INPTX \ IF [K]=8 INPT2
  1581. :INPT1\ PRINT CHAR([K]); \ %COLUMN=[C;] \ GOTO INPUT
  1582. :INPT2\ %COLUMN-- \ POKE 0 (%ROW,%COLUMN)ASCII 32 \ GOTO INPUT
  1583. :INPTX\ RET 
  1584. '--------------------------------------------------------------------------
  1585.  
  1586. ##############################################################################
  1587.  
  1588. This short program segment shows how to link several screens together (e.g.
  1589. a HELP section).  The HELP screens are loaded into the upper buffers
  1590. (6O through 63). The Page-Up and Page-Down keys will sequentially cycle through
  1591. these buffers.  The Enter key provides a way to exit this routine.
  1592.  
  1593.        V1=6O \ COPY(HELP1,6O) \ COPY(HELP2,61) \ COPY(HELP3,62) \ COPY(HELP4,63)
  1594. :COPY\ COPY(V1,0)
  1595. :INPT\ WAITKEY  \ IF KEY PGUP DECR \ IF KEY ENTER QUIT 
  1596.                   IF KEY PGDN INCR \ GOTO INPT
  1597. :DECR\ IF V1=6O INPT \ V1=V1-1 \ GOTO COPY
  1598. :INCR\ IF V1=63 INPT \ V1=V1+1 \ GOTO COPY
  1599.  
  1600. :QUIT\ EXITC
  1601.  
  1602. PROGRAMMING TRICKS AND TIPS  (continued)
  1603. The new version of ShowText will allow the programmer to use row values
  1604. greater than 25 (up to 255).  This means that up to ten screens can be linked
  1605. together as though they were part of a large screen having 25O rows. This also
  1606. means that programmers have access to certain "undocumented" buffers outside
  1607. the O to 63 range.  These are accessed by using extended row values.
  1608.  
  1609.  ┌──────┬────┬────┬────┬────┬──────────────────────────────────────────────────┐
  1610.  │buffer│row1│col1│row2│col2│ Description                                      │
  1611.  ╞══════╪════╪════╪════╪════╪══════════════════════════════════════════════════╡
  1612. !│   O  │ 26 │  1 │ 5O │ 8O │ CGA,EGA,VGA video page 1 (text mode)             │
  1613.  ├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
  1614.  │   O  │ 51 │  1 │ 75 │ 8O │ CGA,EGA,VGA video page 2 (text mode)             │
  1615.  ├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
  1616.  │   O  │ 76 │  1 │1OO │ 8O │ CGA,EGA,VGA video page 3 (text mode)             │
  1617.  ├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
  1618.  │   O  │1O1 │  1 │125 │ 8O │ CGA,EGA,VGA video page 4 (text mode)             │
  1619.  ├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
  1620.  │   O  │126 │  1 │15O │ 8O │ CGA,EGA,VGA video page 5 (text mode)             │
  1621.  ├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
  1622.  │   O  │151 │  1 │175 │ 8O │ CGA,EGA,VGA video page 6 (text mode)             │
  1623.  ├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
  1624.  │   O  │176 │  1 │2OO │ 8O │ CGA,EGA,VGA video page 7 (text mode)             │
  1625.  ╞══════╪════╪════╪════╪════╪══════════════════════════════════════════════════╡
  1626. *│  63  │ 26 │  1 │ 5O │ 8O │ temporary - holds last screen loaded from a file │
  1627.  ├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
  1628. *│  63  │ 51 │  1 │ 75 │ 8O │ temporary - holds misc. I/O from last file load  │
  1629.  ├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
  1630.  │  63  │ 76 │  1 │1OO │ 8O │ temporary - used only by SAVE/RESTORE            │
  1631.  └──────┴────┴────┴────┴────┴──────────────────────────────────────────────────┘
  1632.  
  1633. ! Note: The ShowText menu program (ST.EXE) stores a 96-byte configuration block
  1634.         containing project name, path etc. at the end of video page O. (row 26)
  1635.         If your program uses this area, it will be necessary for you to re-type
  1636.         the project name when you exit back to the ShowText menu. It only
  1637.         occurs when you are in the interactive ShowText environment.  This is a
  1638.         minor inconvenience and not a serious problem.
  1639.  
  1640. * Note: The COPY(source,destination) performs a screen-file-load if source is
  1641.         a name (not a variable or number).  e.g. COPY(filename,7)14
  1642.         The first temporary buffer (bfr=63 row=26 to 5O) is overwritten only 
  1643.         if a non-zero fade is specified on the screen-file-load COPY command.
  1644.  
  1645. SHOWTEXT Revision History:
  1646.  
  1647. O9/24/1994 - v 1.2
  1648.   +  Added new system variables: [AS:buf:row:col] , [AT:buf:row:col] and [VIRT]
  1649.   +  Added the XFLOAD and XFSAVE commands.
  1650.   +  Fixed a bug in the PLAY command (from v 1.1).
  1651.   +  Added the ability to specify buf=0 in the $(buf,row,col1,col2) text string
  1652.  
  1653. O7/O8/1994 - v 1.1
  1654.   +  Added ARROWS ON and ARROWS OFF commands
  1655.   +  Added the ability to use row>25 and/or col>80 for most operations
  1656.   +  Added IF-THEN-ELSEIF-ELSE-ENDIF
  1657.   +  Added SELECT CASE\CASE\CASE ELSE\END SELECT
  1658.   +  Added DO\LOOP
  1659.   +  Added WHILE\WEND
  1660.   +  Added support for embedded mathematics expression evaluation including
  1661.      nested parentheses. 
  1662.   +  Added new mathematics operators:   ^  }  ++  -- 
  1663.   +  Added comparison operators:  <   =   >   <=   <>   >=
  1664.   +  Added logic operators:  NOT, AND,  OR, XOR, NAND, NOR, XNOR
  1665.                              (`)  (&)  (@)  (#)   (_)  (|)   (~)
  1666.   +  Added several new system variables 
  1667.      (e.g.  [OVR] and [.r1:c1:r2:c2] and [r1:c1:r2:c2.] )
  1668.   +  Changed the way that system variables are accessed.
  1669.      (ex:  old-way    SYS v1 KEY \ if v1=27 quit   )
  1670.      (ex:  new-way    if [K]=27 quit               )
  1671.  
  1672. O5/15/1994 - v 1.O
  1673.   +  Original public release as shareware.
  1674.  
  1675.  
  1676.  
  1677. ───────────────────────────────────────────────────────────────────────────────
  1678. MISCELLANEOUS PROGRAMS:
  1679.  
  1680. GETAKEY.COM-This program pauses a batch file until a key is pressed.  The 
  1681.             ASCII value of that key is returned as the DOS ERRORLEVEL.  
  1682.             Extended keys such as F1 etc. are returned as 128+scan_code.
  1683.             These values are the same as the values in the keycode table in
  1684.             SHOWTEXT.DOC (except that F11 and F12 are not supported).  This
  1685.             program was meant to be used in batch files using self-displaying
  1686.             .COM files (with ECHO OFF) or with the SHOW.COM program..
  1687.  
  1688. ───────────────────────────────────────────────────────────────────────────────
  1689.  
  1690. SHOW.COM  - This program will display an .STF file on the screen. It may be used
  1691.             in a batch file.  The syntax is SHOW filename or SHOW/P filename .
  1692.             Note that an extension must not be specified on the command line.
  1693.             The first syntax form (SHOW filename) will display the filename.STF
  1694.             on the screen and will continue.  The second form (SHOW/P filename)
  1695.             will display the filename.STF on the screen and will then pause 
  1696.             until the user presses a key.  The ASCII value of that keystroke
  1697.             (or 128+scan_code_value for extended function keys) will be placed
  1698.             in the DOS ERRORLEVEL variable which can then be tested inside a
  1699.             batch file.  This can be used in a simple batch file menu system.
  1700.  
  1701. SHOWTEXT REGISTRATION ORDER FORM
  1702.  
  1703. (The REGISTERED version does not generate the initial UNREGISTERED banner
  1704.  and includes a text-screen capture program and a program to convert drawing
  1705.  files between the following forms: .ANS=(ANSI) .ASC=(Plain ASCII Text)
  1706.  .BSV=(Basic's BSAVE/BLOAD) .COM=(stand-alone executable) .SCN=(4OOO byte
  1707.  screen image) and .STF=(ShowTextFile format).
  1708.  
  1709. Name     ____________________________________________________
  1710.  
  1711. Address  ____________________________________________________
  1712.  
  1713.          ____________________________________________________
  1714.  
  1715.          ____________________________________________________
  1716.  
  1717. Please specify the version of ShowText you are using and where you got it.
  1718.          Version ____________     Source ____________________
  1719.  
  1720. NOTE: SHOWTEXT is distributed on high-density disks ONLY !!!
  1721. Disk Type (check one)   [ ] 5.25" (1.2  Meg)     or    [ ]  3.5" (1.44 Meg)
  1722.  
  1723. Please make check/money order ( $ 25.OO ) to: Garry Spencer/Spencer Technologies
  1724.  
  1725. and mail to: Garry Spencer/Spencer Technologies
  1726.              P. O. Box 34OO9 - Memphis, TN - 38184-OOO9
  1727.              Please do not send cash.  Please allow 3 to 4 weeks for delivery.
  1728.  
  1729. Licensing Information and Disclaimer:
  1730. ------------------------------------------------------------------------------
  1731. O.K. , here's the deal:
  1732. Many hours have been spent on the design and programming of the ShowText system.
  1733. (This is an understatement :-).  Every command has been carefully tested,
  1734. HOWEVER Spencer Technologies/Garry Spencer and any operating principals of the
  1735. company are not liable for the use of this software.
  1736.  
  1737. Upon receipt of your registration fee, you will be sent the latest REGISTERED
  1738. version of ShowText.  The REGISTERED version will be in a sealed package.
  1739. EACH diskette is checked for readability before shipping!  When the REGISTERED
  1740. version is opened and the seal is broken, it may NOT be returned and remitted
  1741. funds are NOT refundable.
  1742.  
  1743. You will be issued a unique registration code which entitles you to technical
  1744. support (up to two requests by MAIL only).  This explains why the registration
  1745. fee is so low, compared to other packages costing nearly $100 (or more).
  1746. Please consider the cost of duplication, handling, postage, taxes, pizza etc.
  1747.  
  1748. Please sign below if you agree with the terms and limitations of this license
  1749. agreement.  Only signed order forms can be processed.  Thank you for ordering
  1750. ShowText.
  1751.  
  1752. Signature _____________________________
  1753.  
  1754.