home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 5
/
ctrom5b.zip
/
ctrom5b
/
PROGRAM
/
DIVERSEN
/
SHWTXT12
/
SHOWTEXT.DOC
< prev
next >
Wrap
Text File
|
1994-09-24
|
92KB
|
1,754 lines
┌────────────────────────────────────────────┐
│ │
│ S H O W T E X T │
│ │
└────────────────────────────────────────────┘
PROGRAMMING LANGUAGE MANUAL
(c) Garry Spencer / Spencer Technologies
P. O. Box 34OO9 - Memphis, TN - 38184-OOO9
The ShowText system consists of a number of files, which are listed in the
text file PACKING.LST.
The function of these files is determined by their extension.
.ST These files are ASCII text files which are edited by your own
text-editor/word-processor and contain the command program that
will control program execution. The syntax of each command in the
ShowText programming language is explained later in this document.
Your text-editor/word-processor must be capable of storing text
in plain ASCII format.
.STF These files are the (Show Text File) drawing files which may be displayed
on the screen during program execution. A single .ST file can hold up to
2048 (.STF) drawing files.
.EXE These files are the finished executable files. They are
generated by compiling the .ST file with any .STF file(s) which
the .ST file references. All of this information is stored in the
.EXE file. These files may be "run" by using the R command from within
the ST program or by issuing the appropriate DOS command.
Please note that any changes to the .ST command file or to any of the
.STF files that it references will require that the program be
recompiled using the C command from within ST or by issuing the
DOS command (STC filename).
Special Note about compiled .EXE files:
The .EXE files generated by the ShowText compiler (STC.EXE) have a
special overlay structure containing configuration data, library files
etc. DO NOT attempt to compress these .EXE files with LZEXE, PKLITE,
DIET or any other .EXE file compressors. You should also be sure that
you run the finished .EXE programs on systems having at least 512k bytes
free because provisions have been made to allow each of these programs
to store up to 63 text screens IN MEMORY! It would probably not be
possible to run these programs from a SHELL-to-DOS.
The ShareWare files must be distributed together. Under NO circumstances, are
the REGISTERED version files to be distributed.
Attention Disk Vendors and BBS Sysops !
To determine if this version of ShowText is the ShareWare or REGISTERED
version, type STC at the DOS prompt. The program (STC.EXE) will display a
message which will show the version type. If you distribute the ShareWare
version in archived form (e.g. ZIPped), use the filename SHWTXT10.ZIP where
(10) indicates version (1.0) .
GENERAL INFORMATION
The ShowText system is designed to allow you to build demonstration
programs, tutorial/help systems, games, batch file menus, product catalogs
etc. using user-designed color text (ASCII) screens. The finished .EXE files
feature integrated mouse support.
Please note that the ShowText system is a programming language. It is highly
recommended that you have some programming experience (in any language) before
attempting to use the ShowText language.
In the ShowText system, there are several stand-alone programs such as
STD.EXE, STC.EXE. These programs may be run from the DOS command
line by specifying the appropriate file as an argument on the command line.
For example,
STD filename will expect an .STF drawing file as the filename
STC filename will expect an .ST command file as the filename
To simplify the operation of the system, there is a menu program (ST.EXE)
which will allow you to control drawing, editing, compiling and running the
program files.
To get started, type the command:
ST filename where filename is the project name (up to 8 characters).
The project name is used for the .ST and .EXE files.
The next few pages will briefly describe the operation of the programs included
in the ShowText system (i.e. ST.EXE, STD.EXE, STC.EXE ).
RUNNING THE MENU PROGRAM (ST.EXE)
When the ST program is executed for the first time on your system it will
look for its configuration file named ST.CFG. This file stores the
command string which is used to invoke YOUR word-processor/text-editor. If this
file is not found, it will prompt you to enter the command string. This is only
done once. If the ShowText files are not in the current directory, then the
directory which contains them must be in the system PATH variable.
If the command line used to invoke ST did not contain a filename (project
name), then you will be prompted to enter the project name. This name is used
as a default for the (.ST) and (.EXE) filenames. Note that ST, STC, STD
and STM are reserved names and should not be used as project names.
The following options (keystrokes) are available in ST (ShowText):
A - toggles the automatic mode. When AUTO is ON, the EDIT/COMPILE/RUN sequence
is performed automatically (if there are no compile-time errors).
C - compiles the .ST command file and any .STF file(s) that it references
into a finished executable (.EXE) file.
D - invokes the drawing program which will enable you to draw the color ASCII
text screens (.STF files) for use in your application program.
E - invokes YOUR word-processor/text-editor by executing a temporary batch file.
There was no need to develop a dedicated text-editor for ShowText since most
users already have a favorite text-editor/word-processor. Please note that
your word-processor/text-editor MUST be capable of storing files in plain
ASCII text format.
P - allows you to change the project name which is used to name the .ST
command files and the .EXE executable files. The names (ST, STC and
STD) are reserved filenames.
R - runs the .EXE executable application program. Note that pressing CTRL and
SHIFT at the same time, while your application is running, will allow you to
adjust the mouse sensitivity.
X (or Esc) will terminate the ST program.
Windows users will need to select the DOS prompt, then type ST filename
(in the appropriate directory).
RUNNING THE DRAWING PROGRAM (STD.EXE)
The drawing program can be invoked from the command line or by selecting the
D option in the menu program. The drawing program is capable of loading and
storing screen text files in three formats indicated by the extension:
.STF - (default) format for the ShowText system
.BSV - format which can be used with BSAVE/BLOAD in BASIC programs
.SCN - stores direct screen image (4000 bytes).
While in the drawing mode, you can access the HELP screen by pressing the F1
key. Note that the drawing files must be in the current directory.
Special Note: If you are designing screens which will be used on monochrome
systems, you should check the appearance of your screen files
on a (typical) target system.
------------------------------------------------------------------------------
RUNNING THE COMPILER PROGRAM (STC.EXE)
The compiler program can be invoked from the command line or by selecting the
C option in the menu program. The program will compile (combine) the specified
.ST command file with any .STF file(s) that it references into a single .EXE
executable file. Note that the .ST file and all needed .STF files must reside
in the current directory. The compiler will display any compile-time errors
on the screen.
------------------------------------------------------------------------------
RUNNING THE EXECUTABLE PROGRAM (.EXE) FILES
The executable .EXE files can be invoked from the command line or by selecting
the R option in the menu program. Note that the mouse sensitivity can be
adjusted by pressing CTRL and SHIFT at the same time while your application
program is running.
PROGRAMMING CONVENTIONS
------------------------------------------------------------------------------
There are many instructions in the ShowText programming language that
require row and column information. You should be careful about allowing
the row value to exceed 25 or the column value to exceed 80. At one time,
these bounds were checked and adjusted, but these values are now
allowed to be as high as 255 in order to provide the programmer with
some interesting options, such as linking up to 10 internal buffers
together with row offsets (from the first buffer) up to 250. The
minimum values are usually still adjusted to 1 if zero is given.
------------------------------------------------------------------------------
Labels are used to allow the program to resume execution at a different
location within the program. A label begins with a semi-colon (:) and
must be defined only once. Note that a label must not contain embedded
spaces and may only be 8 characters (or less) in length. It must
contain ONLY letters and/or numbers. For example,
GOTO TEST123
∙∙∙(other statements skipped)∙∙∙
:TEST123 PRINT "Done"
------------------------------------------------------------------------------
Multiple statements (and labels) are allowed on the same program line by
separating the statements with a backslash. For example,
:QUIT is the same as :QUIT\CLS 7,0\C@1,1\EXIT
CLS 7,0
C@1,1
EXIT
------------------------------------------------------------------------------
A program line can be continued on the next physical line by ending the
line with an underscore (_). Any leading spaces on the continuation line
are trimmed. If leading spaces are to be preserved on the continuation
line, then start that line with an underscore (_). Note: If any
physical line starts with an underscore, the underscore is removed.
ex: print "this is _
_ a test"
'preserve embedded spaces by placing underscore at the beginning
ex: bfill 0 to 1 (1,1,_
25,80) 32 31
------------------------------------------------------------------------------
[var] is a variable (V0 to V255) or an indexed variable (VV0 to VV255).
[val] can also be a variable, an indexed variable or a number (0 to 255).
A variable is similar to an array element. V0 to V255 is similar to
V(0) to V(255) in some other languages. An indexed variable uses the
contents of another variable as an index. VV0 to VV255 is similar to
V(V(0)) to V(V(255)). There are still only 256 variables in the
system. Indexing only allows more options for the programmer.
Variables may only contain values of 0 to 255. Variables may assume an
optional alias by using the (%) sign followed by the alias-name.
ex: %TEMP=%MISC+4 'See the ALIAS command for more information.
------------------------------------------------------------------------------
The single-quote mark (') begins a comment line. The comment continues
until it reaches either the end of the line or a backspace (\).
'This is a test
%Test=%Temp+%Misc
%A=3 'set %A to 3 \ %B=7 'set %B to 7
PROGRAMMING CONVENTIONS (cont'd)
SPECIAL NOTES ABOUT IF STATEMENTS !!!
------------------------------------------------------------------------------
The (IF) statements normally assume that a GOTO will be executed if the
specified conditions are met. The keyword GOTO is not necessary. The
keyword GOSUB may be specified in any (IF) statement in order to allow
the program to jump to a subroutine. This rule works for ANY (IF)
statements. For example,
IF CLK(10,25,15,60) TEST would GOTO TEST if condition is true
IF CLK(10,25,15,60) GOSUB TEST would GOSUB TEST if condition is true
------------------------------------------------------------------------------
ShowText now supports the standard IF-statement formats, such as:
1. single-line IF
IF condition THEN true_action
2. single-line IF
IF condition THEN true_action ELSE false_action
3. block IF
IF condition_1 THEN
true_action_1
ELSEIF condition_2
false_action_1 and true_action_2
ELSE
false_action_1 and false_action_2
ENDIF
SHOWTEXT PROGRAMMING LANGUAGE
------------------------------------------------------------------------------
ALIAS %aliasname=var,%aliasname=var ...etc
Variables may assume an optional alias by using the (%) sign followed
by the alias-name (using ONLY letters and/or numbers). Each alias can
be assigned only once. If a previously unassigned alias is encountered
in the program, it will be automatically assigned to the highest
subscript variable that does not already have an alias. Please note that
there are only 256 variables in the system and the variables can still
be accessed directly by using the Vxxx form. The compiler simply
performs a search-and-replace operation on the (%) terms.
ALIAS %ABC=V1,%XYZ=V5,%TMP=V12 (assigns alias %ABC to variable V1,
%XYZ to V5 and %TMP to V12)
ALIAS %TEMP=V4,%MISC=V8
%TEMP=7 \ %MISC = %TEMP + V3 is the same as V4=7 \ V8=V4+V3
Note: All alias names are converted to UPPERCASE by the compiler.
See the GUESS.ST and MMIND.ST programs for examples of alias use.
------------------------------------------------------------------------------
ARROWS
ARROWS OFF
These two commands control how the arrow keys (up,down,left and right)
are interpreted by the system. The first form (ARROWS) will cause the
program to move the screen cursor in response to the arrow keys. This
is the default mode. The second form will cause the program to return
a keycode (up=200, down=208, left=203 and right=205) without moving the
screen cursor. The mouse, if present, will continue to be able to move
the cursor.
------------------------------------------------------------------------------
ATTR val
This instruction changes the current screen color to val,
where val is the decimal equivalent of the binary attribute code
in the form:
bbbbbbbb
│└─┤└──┴─── foreground color 0 to 15
│ └─────── background color 0 to 7
└────────── blink bit (foreground will blink if set)
(see the table for the COLOR statement to determine colors)
Variables or numbers may be used to specify (val).
This instruction is useful where the default colors have been stored in
a variable with ( var=[AT;] ). The color can be restored very easily
with (ATTR var).
example: ATTR 31 would set foreground to white and background to blue
white=15 blue=1 color_byte= (1*16) + 15 = 31
------------------------------------------------------------------------------
BEEP
This instruction causes the PC speaker to emit a short beep (tone).
BCOPY source TO dest (row1,col1,row2,col2)
BCOPY source TO dest (row1,col1,row2,col2) OFFSET (row3,col3)
This instruction (in both forms) copies a block of text from the
source buffer (0 to 63) to the destination buffer (0 to 63). The
block is defined by the row1,col1 (upper-left corner) and the row2,col2
(lower-right corner). The first form of the instruction copies the
text to the same part of the buffer. The second form of the instruction
copies the text to the upper-left corner defined by row3,col3 providing
a way to offset the text in the destination buffer. Variables and/or
numbers may be used for the row/column information. The word OFFSET is
optional.
Note: buffer 0 is the screen - buffers 1 to 63 are internal buffers
example: BCOPY 1 TO 0 (1,1,25,80) 'copy entire buffer 1 to screen
----------------------------------------------------------------------------
BFILL buffer (row1,col1,row2,col2) ASCII val
BFILL buffer (row1,col1,row2,col2) ATTR val
BFILL buffer (row1,col1,row2,col2) val val
This instruction (in all three forms) will fill an area in the buffer
with an ASCII character and/or an attribute (foreground/background
color). The boundaries of the block are defined by row1,col1 (as the
upper-left corner) and row2,col2 (as the lower-right corner). The first
form, with the keyword ASCII, will only fill the block with the ASCII
character code specified in val. The second form, with the ATTR keyword,
will only fill the block with the foreground/background color specified
as an attribute in val. The third form, with two values, will fill the
block with the ASCII character code specified in the first val and the
foreground/background color specified as an attribute in the second val.
See the ATTR command for a description of an attribute byte.
e.g. BFILL 0 (11,42,15,61) 32 7
fills the area on the screen with black spaces.
Note: buf=0 for screen or buf=1 through 63 for internal buffers
-------------------------------------------------------------------------------
BSWAP buffer TO buffer (row1,col1,row2,col2)
BSWAP buffer TO buffer (row1,col1,row2,col2) OFFSET (row3,col3)
This instruction is nearly identical to the BCOPY command, except
that the two blocks are swapped. see: BCOPY
example: BSWAP 0 TO 1 (1,1,25,80) 'swap entire screen with buffer 1
-------------------------------------------------------------------------------
BXOR buffer (row1,col1,row2,col2) xorvalue
The BLOCK-EXCLUSIVE-OR instruction causes the color attributes in the
specified "block" (or "box") in the selected buffer to be XORed with the
xorvalue. This can be used to make the block flash etc. If a region is
XORed twice with the same xorvalue, then the color attributes of that
region will be returned to their original values.
example: BXOR 0 (1,1,25,80) 127 \ WAIT .09 'flash the entire screen
BXOR 0 (1,1,25,80) 127 \ WAIT .09 'then return to normal
Note: upper-left-corner is row1,col1 and lower-right-corner is row2,col2
-------------------------------------------------------------------------------
C@ row,column
This instruction locates the screen cursor at the specified row
(1 to 25) and column (1 to 80). For example, C@12,40 would locate
the screen cursor at row 12 and column 40.
-------------------------------------------------------------------------------
CHK and NOCHK
These instructions turn the keyboard/mouse monitoring routines ON/OFF.
The program normally checks the keyboard/mouse status between each
statement. This allows quick response to user input especially the
interrupt keys specified in the ON INTKEYn statements, but can also
slow the program down during intensive tasks such as repetitive PEEK
and POKE operations. The NOCHK command causes the program to ignore
the keyboard and mouse except when a WAIT or WAITKEY command is
executed. This statement should be used carefully because it can cause
the cursor to 'freeze' at a point on the screen between WAIT and/or
WAITKEY statements. The CHK command should be executed as soon as
possible. It may occasionally be necessary for the RST K
command to be executed prior to executing the CHK statement, because
it will clear the PC keyboard buffer of any input encountered while the
NOCHK was in effect.
----------------------------------------------------------------------------
CLS or CLS foreground,background
This instruction (in both forms) clears the screen. The first form
clears the screen in the current foreground/background colors.
The second form is equivalent to COLOR foreground,background\CLS. The
colors may be variables or numbers. See the table of colors for the
COLOR command. example: CLS 15,1
'clear screen white foreground (15) & blue background (1)
----------------------------------------------------------------------------
COLOR foreground
COLOR foreground,background
This instruction (in both forms) changes the default screen color.
The first form only changes the foreground while the second form
changes both the foreground and background colors. The available
colors are shown in the following table:
Foreground Background
------------------ --------------------
0 black 0 black
1 blue 1 blue
2 green 2 green
3 cyan (blue-green) 3 cyan (blue-green)
4 red 4 red
5 magenta (purple) 5 magenta (purple)
6 brown 6 brown
7 light gray 7 dark gray
8 dark gray
9 bright blue
10 bright green
11 bright cyan (blue-green)
12 bright red
13 bright magenta (purple)
14 bright yellow
15 bright white
Note: The text can be made to blink by adding 16 to the foreground color.
Variables or numbers may be used to specify the colors.
example: COLOR 4,3 'change colors to red foreground=4, cyan background=3
COPY (source,destination)
COPY (source,destination) fade
This instruction is the heart of the ShowText system. In both forms,
it allows an entire screen image to be copied from the source to the
destination.
The source and destination may be:
0 which is the screen
1 to 63 which are internal buffers
variables V0 TO V255
indexed variables VV0 to VV255.
Note: The contents of variables are ANDed with 63 at run-time in order
to force the source/destination into the range of 0 to 63.
The source may also be a library file specified by up to 8 characters.
The default (only) extension is .STF. These files must be present in
the current directory at compile time (using STC.EXE). These files are
stored in the resultant .EXE executable file. This means that the
individual (.STF) files do not need to be distributed to the end user of
the (.EXE) executable file. The file names must NOT be in the same form
as a variable or number (e.g. 123, V123, VV123 etc.) since the compiler
would assume that you meant to use an actual variable or number as the
source buffer number.
For example, COPY (TEST,7) would copy the file TEST.STF (which had
been stored in library format inside the .EXE file) to internal buffer 7.
The second form of this instruction may be used whenever the destination
is buffer 0 (which is the screen). The "fade" value can be a number or a
variable and tells the program how to draw the image on the screen. The
ShowText system supports a fairly large number of fades. If a fade is
specified that is greater than the number of available fades, the default
fade of 0 (quick) is used. If the fade number 255 is used, the program
will pick a fade at random.
For example, V7=4 \ COPY (V7,0) 1
'---or---
COPY (4,0) 1
would copy the screen image in buffer 4 to the screen using the fizz
fade. Please refer to the table of available fades in the appendix of
this documentation file.
CSR LIM (top_row , leftmost_column , bottom_row , rightmost_column)
CSR LIM
The first form, with operands, sets the limits on the screen cursor
location and the second form, with no operands, restores the limits
to include the entire screen.
ex: WINDOW (15,35,25,65) 100 \ CSR LIM (15,35,25,65)
'this would force the cursor to stay inside the window
'upper-left (row=15,column=35) and lower-right (row=25,column=65)
----------------------------------------------------------------------------
CSR ON num TO num (where num is the scan line 0 to 7)
CSR (default is CSR ON)
CSR OFF
The first form (CSR ON num TO num ) will cause the cursor to be
visible. The two numbers determine the size of the cursor. Scan
line 0 is the top, while scan line 7 is the bottom line (of the cursor)
on a VGA monitor. The form (CSR OFF) causes the cursor to be
invisible. Variables can NOT be used to specify the scan lines.
Note: When a program (.EXE) is run, the cursor will initially be off.
For example:
CSR ON 0 TO 7 makes a large cursor appear on the screen
CSR OFF turns the cursor off
CSR with no arguments turns cursor on using last scan numbers 0 & 7
----------------------------------------------------------------------------
form1: DO {WHILE|UNTIL|UNLESS} condition
∙∙∙
∙∙∙statements∙∙∙
∙∙∙
LOOP
form2: DO
∙∙∙
∙∙∙statements∙∙∙
∙∙∙
LOOP {WHILE|UNTIL|UNLESS} condition
The first form of the DO-LOOP tests the condition for looping at the
beginning of the loop. The second form performs the test at the end of
the loop. One of the keywords WHILE/UNTIL/UNLESS is necessary to specify
which type of test to perform. Looping will continue as long as the
conditions are met. For example, the following two loops would print
the numbers 1 through 10.
%I=0 %I=1
DO DO WHILE %I<=10
%I++ PRINT %I,3Q
PRINT %I,3Q %I++
LOOP UNTIL %I=10 LOOP
----------------------------------------------------------------------------
ERRORLEVEL val
This instruction sets the DOS ERRORLEVEL variable to (val). The last
ERRORLEVEL statement executed before the program exits will determine
the value which is returned to DOS. This value can be tested by DOS
in a batch file to allow branching or conditional execution of a
particular batch command. This makes it possible to use ShowText in
a batch file menuing system. The argument (val) can be a number or a
variable. Its initial value is zero.
example: ERRORLEVEL 7 would set the DOS error level to 7
----------------------------------------------------------------------------
EXIT
EXITC
The EXIT instruction allows the program to return to DOS (or to the
ShowText menu). If the .EXE program is invoked from DOS, then it
will exit to DOS. Note that the screen is not cleared. If you wish
to end a program with the screen cleared and with the cursor at
row 1 and column 1, then use the command EXITC.
FOR loop_var = loop1 to loop2 STEP loop3
NEXT loop_var
(where the loop variable (loop_var) must be a variable V0 to V255,
and must NOT be an indexed variable.)
(loop1,loop2 and loop3 can be numbers, variables or indexed variables)
These instructions allow the program to loop through a section of
program code - between the FOR and the NEXT statements.
loop1 = starting value of the loop variable (loop_var).
loop2 = ending value for the loop variable
loop3 = incremental step between iterations (always greater than zero)
(default is 1 if the word STEP and loop3 are not specified)
For example: FOR V1=3 TO 9 STEP 2
PRINT V1,1
NEXT V1
would cause the variable V1 to be printed with values of 3,5,7 and 9.
Note: The FOR/NEXT loops can be nested, but be careful to nest these
loops properly.
e.g. right: FOR V1=1 TO 4 \ FOR V2=3 TO 9 \ NEXT V2 \ NEXT V1
wrong: FOR V1=1 TO 4 \ FOR V2=3 TO 9 \ NEXT V1 \ NEXT V2
If NEXT is specified without a variable, the last open FOR loop
variable is used. For example,
FOR V1=1 TO 10 \ FOR V2=3 TO 5 \ NEXT \ NEXT
The first NEXT closes the FOR V2 loop and the second NEXT closes
the FOR V1 loop.
------------------------------------------------------------------------------
GOTO label
This instruction transfers control to the specified label. Program
execution will continue at that point in the program code. The label
can be preceded by a (:) in the GOTO statement.
For example GOTO :TEST and GOTO TEST are identical in operation.
------------------------------------------------------------------------------
GOSUB label
RETURN or RET
The GOSUB statement pushes the address immediately following the GOSUB
onto the stack. The program will then transfer control to the specified
label (like a GOTO). The subroutine will continue execution until a
RETURN is encountered. The RETURN will pop an address off the stack and
will transfer control to that address. If the stack is empty (as in the
case when a RETURN without GOSUB situation occurs) the RETURN statement
would not signal an error but would simply do nothing.
example: :HERE \ GOSUB TEMP
:THERE \ ...other statements...
:TEMP \ PRINT "subroutine called" \ RET
When the label (HERE) is reached, control goes to (TEMP). The RET
causes program execution to continue at label (THERE).
IF BSAME buf TO buf (row1,col1,row2,col2) (row3,col3) label
IF BDIFF buf TO buf (row1,col1,row2,col2) (row3,col3) label
The first instruction compares the contents of two buffers and performs
a GOTO label if the blocks are the same. If the specified blocks are
not the same, program execution continues at the statement following the
IF BSAME instruction. The comparison is performed on ASCII text only
(i.e. the attribute is not checked). The coordinates row1,col1,row2,col2
correspond to the upper-left and lower-right corners (respectively) of
the block in the first buffer. The coordinates row3,col3 correspond to
upper-left corner of the block in the second buffer. Note that if the
(row3,col3) term is omitted then the same coordinates are used in BOTH
blocks/buffers. If a coordinate is specified outside the range (row=1
to 25 and col=1 to 80) the block is downsized accordingly. Normally,
this should not be a problem. Buffer 0=screen and buffer 1 through 63
are internal buffers.
example: IF BSAME 0 TO 1 (1,1,25,80) (1,1) ALIKE
'if entire screen is identical to buffer 1 then go to label ALIKE
'else continue at statement following this IF BSAME instruction
Note: The IF BDIFF instruction will GOTO label if the blocks are
different.
IF CLK (row1,col1,row2,col2) label
IF NOT CLK (row1,col1,row2,col2) label
When the user presses a key (or a mouse button), the ShowText system
generates three things: a KEY (0 to 255) value , a ROW CLICK
(row 1 to 25) value and a COLUMN CLICK (column 1 to 80) value. These
values are placed in a 63 byte circular (first-in-first-out) buffer.
The O-N-L-Y way to make these values available to the program is to
execute a WAITKEY command. The WAITKEY command retrieves the next
character in the keyclick buffer. If no user input is waiting then
KEY=0 (NULL),ROW CLICK=0 and COLUMN CLICK=0.
The IF CLK and IF NOT CLK commands simply test the last (row,column)
click values which were made available by the WAITKEY command.
A block on the screen defined by the upper-left (row1,col1) and the
lower-right (row2,col2) coordinates is tested to see if the last click
was within its range. The first form (IF CLK) will execute a GOTO
label if it was within its defined block. The second form (IF NOT CLK)
will execute a GOTO label if it was not within its defined block.
If either of the IF statements fail, the program continues execution
at the statement immediately following the IF statement. This is the
way all of the IF statements work.
example: IF CLK (25,1,25,80) TEMP
If the mouse/keyboard is pressed while the cursor is on the bottom
row (25), then program execution will continue at label TEMP.
----------------------------------------------------------------------------
IF CSR (row1,col1,row2,col2) label
IF NOT CSR (row1,col1,row2,col2) label
where row1,col1 define the upper-left corner of the test block while
row2,col2 define the lower-right corner.
These instructions check the location of the screen cursor to determine
if it is within the defined block. The IF CSR instruction will
execute a GOTO label if the screen cursor is within its defined block.
The IF NOT CSR will execute a GOTO label if the screen cursor is not
within its defined block.
example: IF CSR (25,1,25,80) TEMP
If the mouse/keyboard moves the screen cursor to the bottom
row (25), then program execution will continue at label TEMP.
IF KEY key label
IF NOT KEY key label
When the user presses a key (or a mouse button), the ShowText system
generates three things: a KEY (0 to 255) value , a ROW CLICK
(row 1 to 25) value and an COLUMN CLICK (column 1 to 80) value. These
values are placed in a 63 byte circular (first-in-first-out) buffer.
The O-N-L-Y way to make these values available to the program is to
execute a WAITKEY command. The WAITKEY command retrieves the next
character in the keyclick buffer. If no user input is waiting then
KEY=0 (NULL), ROW CLICK=0 and COLUMN CLICK=0.
The IF KEY and IF NOT KEY commands will test the KEY value for a match.
The first form (IF KEY) will execute a GOTO label if the KEY value
matches its test value. The second form (IF NOT KEY) will execute a
GOTO label if the KEY value does not match its test value. Note that
the arrow-keys (up,down,left,right) can NOT be trapped.
e.g. IF KEY ESC TEST would GOTO TEST if the last key was an escape.
IF NOT KEY NULL TEST would GOTO TEST if any key was pressed.
other valid examples include:
IF KEY ALT F1 TEST (note that ALT CTRL SHIFT can be used but
IF KEY CTRL F1 TEST not in the same statement)
IF KEY SHIFT F1 TEST
IF KEY SPACE TEST
IF KEY A TEST (note: keyboard input is tested as capitalized (a=A) )
IF KEY 7 TEST
IF KEY $ TEST
----------------------------------------------------------------------------
IF Tn >= seconds label
IF Tn < seconds label
where n=0 to 15
where seconds is a number between 0 and 3600 seconds
These instructions check the specifed 16 bit timer to determine how
much time (in seconds) has elapsed since the last RST Tn was
executed. The [ IF Tn >= ] will execute a GOTO label if the timer
value equals or exceeds the seconds value. The [ IF Tn < ] will
execute a GOTO label if the timer value is less than the seconds value.
If the timer itself is allowed to exceed 3600.8 (which is a little more
than 1 hour ), the timer value is maintained at 3600.8 seconds (which
is internally expressed as 65535/18.2). The resolution is about
1/18.2 of a second. There are sixteen of these 16-bit timers available.
example: RST T2 \ ' resets timer#2 to 0
:LOOP \ IF T2 < 4.5 LOOP \ ' stays in loop for 4.5 seconds
IF var < val label
IF var <= val label
IF var <> val label
IF var = val label
IF var > val label
IF var >= val label
These instructions test the variable (var) with the specified value
(val). A GOTO label is executed if the condition is true.
example: IF V1 <= V2 TEMP
would go to label TEMP if V1 is less than or equal to V2
IF %ABC = %XYZ+2 TEST
would go to label TEST if variable %ABC is equal to (%XYZ + 2)
--------------------------------------------------------------------------------
IF var label 'GOTO label if var is non-zero
IF NOT var label 'GOTO label if var is zero
--------------------------------------------------------------------------------
*See the special note about IF statements in the PROGRAMMING CONVENTIONS
section near the beginning of this document.
INPUT TEXT (row, startingcolumn, endingcolumn, attribute)
INPUT TEXT CAPS (row, startingcolumn, endingcolumn, attribute)
INPUT var (row, startingcolumn, endingcolumn, attribute)
The INPUT TEXT instruction allows the user to type a string of text
on the screen. An edit-window is opened on the screen on the specified
row and between startingcolumn and endingcolumn. NO error checking is
done on the coordinates. Do NOT allow the input field to wrap around
to the next screen row ! The color of the input text is determined by
the attribute value (see ATTR command).
Note: The default screen cursor/colors are not changed by this command.
The text can be upper or lower case but if the CAPS keyword appears in
the command, the text will be capitalized when the input is finished.
This text is only placed on the screen, but BCOPY can be used to
move it to a buffer. The left-arrow, right-arrow and backspace are the
editing keys. The Enter and Escape keys will terminate the text input
routine. It is possible to use var=[K] to find out which key
terminated the routine (Enter=13 or Escape=27). The var=[.C]
command will return the column position of the rightmost non-space
character in the input text field. All type-ahead is cancelled prior
to executing INPUT TEXT.
The INPUT var command is identical except that the text string is
converted to a number which is then placed in the specified variable.
Note that non-numeric characters in the text field are actually ignored.
The number must be in the range 0 to 255 or else the specified variable
will contain 0 (zero) and the EXTRA [X] variable will contain 255.
INPUT TEXT (1,10,20,31) would input white/blue text on
row 1 between columns 10 and 20 (mixed-case)
INPUT TEXT CAPS (1,10,20,31) would input white/blue text on
row 1 between columns 10 and 20 and then
would capitalize it on-screen
INPUT V1 (1,10,20,31) would input a numeric value using white/blue text
on row 1 between columns 10 and 20
Note: The screensaver function will not operate during the INPUT TEXT
function. You may substitute a question mark (?) for INPUT.
?TEXT (row, startingcolumn, endingcolumn, attribute)
?TEXT CAPS (row, startingcolumn, endingcolumn, attribute)
?var (row, startingcolumn, endingcolumn, attribute)
--------------------------------------------------------------------------------
MEM PEEK offset var
This instruction will look at the PC's lowest 64k memory segment
0000:offset and will place the value in the variable (var). This
is useful for checking keyboard shift status, video mode etc.
For example, MEM PEEK 1047 V1 would place the keyboard shift status
in variable V1 where the binary weight of each bit is as follows:
1 = right Shift pressed 16 = Scroll-Lock ON
2 = left Shift pressed 32 = Num-Lock ON
4 = Ctrl key pressed 64 = Caps-Lock ON
8 = Alt key pressed 128 = Insert mode ON
LEFT MOUSE key
CENTER MOUSE key
RIGHT MOUSE key
These instructions will specify which keycode is sent to the program
when a mouse button is pressed. The default is SPACE (code=32).
e.g. LEFT MOUSE ENTER
RIGHT MOUSE ESC
SPECIAL NOTE:
When running an application, which has been developed using the
ShowText system, the mouse sensitivity can be adjusted by pressing
Shift and Ctrl at the same time. The default sensitivity is set for
a 200 dpi mouse.
----------------------------------------------------------------------------
ON INTKEYn key GOSUB label
ON INTKEYn key GOTO label
where n can be 0 to 7 and key is a specified key code
These instructions allow the programmer to specify up to 8 critical
keys that the program should watch for. The specified action is taken
regardless of what the program was doing (like an interrupt). An
example might include a system-wide help screen or exit function.
NOTE: When an interrupt key is pressed, the current keyclick values
(KEY,ROW CLICK and COLUMN CLICK) are NOT overwritten by the interrupt
key's keyclick values. You may use the IF CSR to access the current
screen-cursor values.
e.g. ON INTKEY0 CTRL C GOTO QUIT
ON INTKEY1 F1 GOSUB HELP
∙
∙ (other statements)
∙
:HELP
∙
∙ (other statements)
∙
RETURN
∙
:QUIT \ C@1,1 \ EXIT
When using the GOSUB option, it is a good idea to save the screen
to a safe place like internal buffer 63 and then restore it prior
to executing a RETURN. The current screen-cursor and print-cursor
values should also be saved (to variables) and restored if they are
changed inside the subroutine. The command ON INTKEYn NULL will
effectively disable an interrupt key. It can enabled again later.
ON var GOTO label1,label2,label3,label4
ON var GOSUB label1,label2,label3,label4
These instructions will take the appropriate action (GOTO or GOSUB)
based on the value of the variable (var).
For example,
ON V1 GOTO FIRST,SECOND,THIRD
If the variable V1=1 then the program would GOTO FIRST
If the variable V1=2 then the program would GOTO SECOND
If the variable V1=3 then the program would GOTO THIRD etc.
If the variable is equal to zero or the variable is greater than
the number of labels, then program execution will resume at the
statement following the (ON var GOTO) or (ON var GOSUB ).
The ON GOSUB is similar but it places the return address (of the
statement following the ON GOSUB) onto the stack. This allows the
subroutine's RETURN (or RET) statement to operate properly.
The maximum number of labels per line is 63.
--------------------------------------------------------------------------------
P@ row,column
This instruction locates the print cursor at the specified row
(1 to 25) and column (1 to 80). For example, P@12,40 would locate
the print cursor at row 12 and column 40. This determines where
the next print statement will start. see: PCSR LIM below
-------------------------------------------------------------------------------
PCSR LIM (top_row , leftmost_column , bottom_row , rightmost_column)
PCSR LIM
The first form, with operands, sets the limits on the print cursor
location and the second form, with no operands, restores the limits
to include the entire screen. Note: This means that printing can only
occur within the specified limits.
ex: WINDOW (15,35,25,65) 32 \ PCSR LIM (15,35,25,65)
'this would force the cursor to stay inside the window
'upper-left (row=15,column=35) and lower-right (row=25,column=65)
-------------------------------------------------------------------------------
PEEK buffer (row,column) ASCII var
PEEK buffer (row,column) ATTR var
PEEK buffer (row,column) var var
POKE buffer (row,column) ASCII val
POKE buffer (row,column) ATTR val
POKE buffer (row,column) val val
These instructions will allow the program to read (PEEK) or write
(POKE) from/to the specified buffer at the location (row,column).
Using the ASCII keyword would involve only the character code while
using the ATTR keyword would involve only the color attribute. Using
(var var) or (val val) would specify both the ASCII code and the color
attribute would be used (in that order).
ex: PEEK 0 (25,80) V1 V2 would read the screen at (row=25,column=80)
and would put its ASCII value in V1 while
placing its color attribute value in V2.
PLAY "text..."
This instruction 'plays' the specified musical commands through the
PC's internal speaker. A summary of PLAY commands is listed below.
< or > Up or down one octave
A-G Plays A, B, ..., G in current
octave (+ = sharp, - = flat)
Ln Sets length of a note (L1 is
whole note, L4 is quarter note,
etc.) n = 1-64
ML Each note plays full length
MN Each note plays 7/8 of length
MS Each note plays 3/4 of length
Nn Plays note n (n = 0-84, 0 is a
rest)
On Sets current octave (n = 0-6)
Pn Pause for the duration of
n quarternotes (n = 1-64)
Tn Sets number of quarter notes per
minute (n = 32-255, 120 default
e.g. PLAY "O3CDEFGAB"
Please see the special note about the string $(buf,row,col,col) in the
section labeled programming tricks and tips.
----------------------------------------------------------------------------
PORT IN port var
This instruction reads values from the specified I/O port into the
variable (var). ex: PORT IN 512 V1 read port number 512 into V1
PRINT "text........."
prints the text at the current location of the print-cursor
PRINT CHAR(val)
prints the ASCII character whose ASCII code is specified in val.
PRINT var,format
print the specified variable according to the specified format
(characters in format= 1 to 9 L Z O Q)
1 to 9 specifies the width of the field (printing 255 would use 3)
L means left-justify (if L is not specified the default is right-justify)
Z means to pad the field (left-side) with zeros when printing a small #.
O or Q means to replace that (reprehensible) slashed-zero with the
letter O.
ex: PRINT V1,3Q would print V1 right-justified in a 3-column field with
all zeros replaced by the letter O.
TTYPE "text......"
is the same as print but it has a slight delay between characters
like the old teletype machines. This only works for a text string.
Note: If a semi-colon (;) is placed at the end of the line, it will
leave the print cursor at that position rather than simulate
a <cr><lf> (carriage∙return-line∙feed). e.g PRINT "ABC";
This is true for all of the PRINT/TTYPE commands.
Please see the special note about the string $(buf,row,col,col)
in the section labeled programming tricks and tips.
The exclamation mark (!) can be used in place of PRINT while (!!)
can be used in place of TTYPE. e.g. ! "text" or !! "text"
----------------------------------------------------------------------------
PUSH variablelist
POP variablelist
These instructions PUSH/POP variables on/off the variable stack. (Note
that the variable stack is different from the instruction stack used
by the GOSUB/RET/RST S instructions). The variable list can be
specified in a number of ways. Some examples will show how it works.
PUSH 1,2,3 is the same as PUSH V1,V2,V3. (The letter V is optional here)
PUSH 1,5-7,9-12 which is the same as PUSH 1,5,6,7,9,10,11,12 should be
followed later in the program by:
POP 12-9,7-5,1 because values are POPped off the variable stack in the
opposite order in which they were PUSHed onto the stack.
These instructions allow subroutines to push variables onto the stack,
then use them in any routines, then pop the original values back into
the appropriate variables. Be sure not to push too many variables onto
the stack at any given time because the stack is only 1024 bytes long.
e.g. PUSH 0-255\PUSH 0-255\PUSH 0-255\PUSH 0-255 would just fill up the
variable stack. Note that PUSH 0-4 uses less program memory than
PUSH 0,1,2,3,4, so PUSHing/POPping a contiguous range of subscripts
will be more efficient than a scattered group of subscripts.
If you PUSH too many values onto the stack, an error message will be
generated. If you try to POP a value off the stack when there are no
values on the stack, the destination target variable will remain
unchanged and no error message will be given.
RST KEYCLK ( or RST K)
This instruction clears the entire 63 byte keyclick buffer and also
clears the PC's keyboard buffer. This allows the program to cancel
any type-ahead before executing a particular routine.
----------------------------------------------------------------------------
RST STACK ( or RST S)
This instruction pops one (RETURN) value off the stack. This allows
a subroutine to return to a different address than the one which called
it. e.g. RST STACK \ GOTO OTHER
----------------------------------------------------------------------------
RST T reset timer number 0
RST Tn reset timer number n (where n=0 to 15)
RST TS reset all timerS
This instruction resets the specified 16 bit-timer to zero. The timers
have a range of 0 to 3600 seconds and measure the time since the last
RST Tn instruction was executed.
example: RST TS would reset ALL 16 timers to zero
RST T15 would reset timer#15 to zero
----------------------------------------------------------------------------
RESTART
This instruction simply restarts the current program with all variables
reset to zero.
----------------------------------------------------------------------------
SAVE
Saves the current visible screen in the special buffer area.
RESTORE fade
Restores the screen from the special buffer area (with an optional fade).
Note: Only these two commands can access this special buffer.
This is useful before and after a (WINDOW / user input) routine.
ex: SAVE \ CLS \ RESTORE 1 would save-screen, clear-screen then
restore-screen with the FIZZ fade.
----------------------------------------------------------------------------
SCREENSAVER val
This instruction implements a screensaver function which is invoked
when no key/mouse buttons are pressed for the specified time (in
minutes). The screensaver is disabled if the value (val) is zero.
Interactive programs would probably benefit from the use of this
function while constantly-running demo programs which require no user
input would probably not need it.
ex: SCREENSAVER 1 would active screen-saver after 1 minute of
mouse/keyboard inactivity
----------------------------------------------------------------------------
SCROLL UP (row1,col1,row2,col2)
SCROLL DOWN (row1,col1,row2,col2)
These instructions will cause the text inside the block at
(upper-left=row1,col1 lower-right=row2,col2) to scroll one line
in the specified direction. The resultant blank line will be shown in
the default foreground/background color.
ex: SCROLL UP (1,1,25,80) would scroll entire screen up
SELECT CASE test_expression
∙∙∙
∙∙∙statements_block1
∙∙∙
CASE case_expression{,case_expression...}
∙∙∙
∙∙∙statements_block2
∙∙∙
CASE ELSE
∙∙∙
∙∙∙statements_block3
∙∙∙
END SELECT
This group of instructions will allow your program to execute specific
blocks of code depending upon the relationship between the
test_expression and the case_expression(s). The SELECT CASE statement
establishes the value against which all of the case_expressions are
compared. The test_expression and case_expression(s) can be any
mathematical expressions. In addition, the case_expression can also
be in the form value1 TO value2 (e.g. 4 TO 5 )(note: value1 must be
less than value2). It can also be in the form {relational_operator}
value (e.g. <5). More than one case expression can be placed on a
line by separating them with a comma. The CASE ELSE statement is used
to handle any conditions not covered by previous CASE statements. Note
that the CASE ELSE statement is optional.
Example 1
%j=4 \ for %i=1 to 10
SELECT CASE %i 'could also have been a mathematical expression
print "statements before first case are always executed"
CASE 1
print "it was a 1"
CASE 2 TO 3,>=9
print "it was either 2,3,9 or 10"
CASE %j+2,%j*2
print "it was a 6 or an 8"
CASE ELSE
print "if all else fails it was 4,5 or 7"
END SELECT
Example 2 (note that CASE ELSE is not used)
for %i=1 to 10
SELECT CASE %i AND 1
print %i,3q;
CASE 0 \ print " is an even number"
CASE 1 \ print " is an odd number"
END SELECT
System Variables - ( be sure to use the square brackets [ ] )
[info] returns the specified information where [info] can be:
[RANDOM num1 TO num2]
returns a random number within the range num1 to num2.
Note: Num1 and Num2 are numbers (0 to 255) and cannot be variables.
[X] (the EXTRA variable used in most arithmetic operations)
[OVR] (the OVERFLOW variable =255 if overflow =0 if no overflow)
this variable can only be reset to 0 by reading it
e.g. if [OVR] quit
-----------------Keyclick Values----------------------------------------
[K] ( most recent keyclick KEY value)
[KC] ( most recent keyclick KEY value (capitalized) )
[.R] ( most recent keyclick row value)
[.C] ( most recent keyclick column value)
[.AS] ( ASCII value of the character located on-the-screen
at the most recent keyclick row,column coordinates)
[.AT] ( ATTRIBUTE value of the character located
on-the-screen at the most recent keyclick row,col coordinates)
[.F] ( foreground color value of the character located
on-the-screen at the most recent keyclick row,col coordinates)
[.B] ( background color value of the character located
on-the-screen at the most recent keyclick row,col coordinates)
--note-- [.AS] [.AT] [.F] [.B] are always determined from
the visible screen regardless of the VIRTUAL setting.
-----------------Screen Cursor Values-----------------------------------
[CV] ( visual status of the cursor 0=OFF and 255=ON)
[R.] ( row on which the cursor currently resides)
[C.] ( column on which the cursor currently resides)
[AS.] ( ASCII value of the character located on-the-screen
at the current cursor row,column coordinates)
[AT.] ( ATTRIBUTE value of the character located
on-the-screen at the current cursor row,col coordinates)
[F.] ( foreground color value of the character located
on-the-screen at the current cursor row,col coordinates)
[B.] ( background color value of the character located
on-the-screen at the current cursor row,col coordinates)
--note-- [AS.] [AT.] [F.] [B.] are always determined from
the visible screen regardless of the VIRTUAL setting.
[-R.] minimum cursor row value────┐
[+R.] maximum cursor row value ├─set by the last
[-C.] minimum cursor column value │ CSR LIM
[+C.] maximum cursor column value─┘ command executed
-----------------Print Cursor Values------------------------------------
[R;] ( row on which the print-cursor currently resides)
[C;] ( column on which the print-cursor currently resides)
[AT;] ( current foreground/background attribute byte) for printing
[F;] ( current foreground color 0 to 31) for printing
[B;] ( current background color 0 to 7) for printing
[-R;] minimum print cursor row value────┐
[+R;] maximum print cursor row value ├─set by the last
[-C;] minimum print cursor column value │ PCSR LIM
[+C;] maximum print cursor column value─┘ command executed
System variables - continued
[VIRT] returns the current virtual buffer number (last set by VIRTUAL)
(i.e. where CLS, PRINT, COPY (%buffer,0) etc. are performed)
if =0 then printing goes to visible screen (virtual mode is off)
if<>0 then printing goes to specified buffer (virtual mode is on)
[M?] 255 if mouse present 0 if no mouse was found
[MB] 255 if any mouse button pressed 0 otherwise
[ML] 255 if left mouse button pressed 0 otherwise
[MR] 255 if right mouse button pressed 0 otherwise
[MC] 255 if center mouse button pressed 0 otherwise
[JAX] joystick A analog (X) value (0 to 255)
[JAY] joystick A analog (Y) value (0 to 255)
[JBX] joystick B analog (X) value (0 to 255)
[JBY] joystick B analog (Y) value (0 to 255)
[JAF] 255 if joystick A fire button pressed ( 0 otherwise)
[JAB] 255 if joystick A base button pressed ( 0 otherwise)
[JBF] 255 if joystick B fire button pressed ( 0 otherwise)
[JBB] 255 if joystick B base button pressed ( 0 otherwise)
[Tn] (returns the least significant 8 bits of the specified 16 bit
timer's value while the most significant 8 bits are placed in
the EXTRA variable) (n=0 to 15) e.g. V2=[T0] \ V3=[X]
(Note: These values are in clock-ticks and are NOT in seconds)
There are approximately 18.2 clock-ticks in one second.
[RND] with no arguments - returns a random number between 0 and 255
[STK] ( instruction stack pointer i.e. level of subroutine)
[ERL] ( current DOS ERRORLEVEL value)
┌────────────────────────────────────────────────────────────────────┐
│ The following values are available on AT class PCs with CMOS RAM │
│ [YR] ( tens of years e.g. 1995 would return 95) │
│ [MON] ( current month 1 to 12) │
│ [DAY] ( current day 1 to 31) │
│ [HR] ( hour in 24 hr format eg. 1 pm = 13) │
│ [MIN] ( minutes e.g. 12:34 = 34 ) │
│ [SEC] ( seconds eg. 12:34:56 = 56 ) │
└────────────────────────────────────────────────────────────────────┘
[.row1:column1:row2:column2] is 225 if last click was in "box"
is 0 if not
[row1:column1:row2:column2.] is 225 if cursor is currently in "box"
is 0 if not
[AS:buf:row:col] returns the AScii value of the character located
in buffer "buf" at the specified row and column
[AT:buf:row:col] returns the ATtribute-byte value of the character
located in buffer "buf" at the specified row and column
>>> Note the use of colons (:) instead of commas (,) in these four
system variables. This makes parsing of the command line more
straightforward.
ex: V0=[K] places the most recent keyclick value into V0
var=val
var++ (increment var by 1) ex: V7++ is the same as V7=V7+1
var-- (decrement var by 1) ex: V7-- is the same as V7=V7-1
var=val^val (exponentiation)
var=val*val (multiplication)
var=val/val (division)
var=val{val (modulo division - returns the remainder of val/val)
var=val+val (addition)
var=val-val (subtraction)
var=val<val (less than)----------------always 0(false) or 255(true)
var=val=val (equal to)-----------------always 0(false) or 255(true)
var=val>val (greater than)-------------always 0(false) or 255(true)
var=val<=val (less than or equal to)----always 0(false) or 255(true)
var=val<>val (not equal to)-------------always 0(false) or 255(true)
var=val>=val (greater than or equal to)-always 0(false) or 255(true)
var=`val (same as var= NOT val) note:symbol is ascii 96
var=val&val (same as var=val AND val)
var=val@val (same as var=val OR val)
var=val#val (same as var=val XOR val)
var=val_val (same as var=val NAND val) also var=NOT(val AND val)
var=val|val (same as var=val NOR val) also var=NOT(val OR val)
var=val~val (same as var=val XNOR val) also var=NOT(val XOR val)
var is a variable (V0 to V255) or an indexed variable (VV0 to VV255).
val can also be a variable, an indexed variable or a number (0 to 255).
A variable is similar to an array element. V0 to V255 is similar to
V(0) to V(255) in some other languages. An indexed variable uses the
contents of another variable as an index. VV0 to VV255 is similar to
V(V(0)) to V(V(255)). There are still only 256 variables in the
system. Indexing only allows more options for the programmer.
These instructions perform the specified (integer) math operation.
The variables have unsigned 8-bit values which means that they may
only contain numbers from 0 to 255. The AND,OR and XOR are bitwise
logic instructions. The EXTRA variable [X] is used to hold the overflow
and underflow of the math operations. The overflow variable [OVR] is
set to 255 if ANY math over/underflow occurs. OVR is reset to zero
ONLY when it is read.
Notes:
These instructions can be embedded in normal instructions.
e.g. %A = (%B + 45) * ((%C + 1) / 4)
The EXTRA variable's value is set by the LAST math operation performed.
If you use the literal AND,OR,XOR forms instead of the &,@,# forms, then
you M-U-S-T include a space on either side of the word. This allows the
command parser to function properly.
Example: %Temp = %Misc OR %Other 'correct
%Temp = %MiscOR%Other 'incorrect - use %Temp = %Misc@%Other
The order of execution of mathematical operations is:
1st - parentheses ( )
2nd - exponentiation ^
3rd - multiplication *
4th - division and modulo / {
5th - add subtract + -
6th - relational < = > <= <> >=
7th - logical NOT `
8th - logical & @ # _ | ~
VIRTUAL val
Sets the address used by buffer 0 to the specified buffer's address.
For example, VIRTUAL 2 means that CLS, PRINT, COPY(4,0) etc. would
perform their actions on buffer 2 instead of on the visible screen.
VIRTUAL 0 would change the address of buffer 0 to the visible screen.
----------------------------------------------------------------------------
WAIT seconds
where seconds is 0 to 3600.8 seconds and represents how long the
program should wait. ex: WAIT 2 would pause program for two seconds
----------------------------------------------------------------------------
WAITKEY seconds
WAITKEY seconds,label
WAITKEY
where seconds is 0 to 3600 seconds and represents how long the
program should wait for a key/mouse button press.
ex: WAITKEY 10,TOOLATE would retrieve a keyclick pressed within
ten seconds and then continue execution at the next statement,
otherwise if no key/mouse is pressed within ten seconds a
GOTO TOOLATE would be executed.
When the user presses a key (or a mouse button), the ShowText system
generates three things: a KEY (0 to 255) value , a ROW CLICK
(row 1 to 25) value and a COLUMN CLICK (column 1 to 80) value. These
values are placed in a 63 byte circular (first-in-first-out) buffer.
The O-N-L-Y way to make these values available to the program is to
execute a WAITKEY command. The WAITKEY command retrieves the next
character in the keyclick buffer. If no user input is waiting then
KEY=0 (NULL), ROW CLICK=0 and COLUMN CLICK=0.
The first form of the instruction will cause execution to continue at
the statement following the WAITKEY statement whenever a key/mouse
button is pressed or when the time interval has expired.
The second form of the instruction will cause execution to continue at
the statement following the WAITKEY statement only if a key/mouse button
is pressed. If the time interval expires before a key/mouse button is
pressed, execution continues at the specified label (like GOTO label).
The third form waits indefinitely for a key/mouse-press then continues.
WHILE condition
∙∙∙
∙∙∙statements∙∙∙
∙∙∙
WEND
The WHILE-loop is performed as long as the condition is true. For
example, the following program will print the numbers 1 through 5.
%I=1
WHILE %I<=5
PRINT %I,3Q
%I++
WEND
----------------------------------------------------------------------------
WINDOW (row1,col1,row2,col2) val
This instruction will draw a window (with the current colors) between
the upper-left (row1,col1) and the lower-right (row2,col2) positions
on the screen. The interior of the window is painted with current colors.
Text may then be inserted inside the window with the print statement etc.
The value (val) specifies a window type and may be a number or variable.
window ┌───┐ ╒═══╕ ╓───╖ ╔═══╗
types: │100│ │101│ ║102║ ║103║ Type 104=MARQUEE
└───┘ ╘═══╛ ╙───╜ ╚═══╝
ex: WINDOW (1,1,25,80) 100 places single-line window around entire screen
NOTE: Type 104 generates a "marquee" around the specified box in low
intensity current colors. This type of window differs from all others
because the inside of the box is "clear" (i.e. it is not painted over
by this instruction and can be followed by a BFILL instruction).
Values outside the range of 100 to 104 will place the ASCII character
code (val) around the perimeter of the window. See TIPS/TRICKS section.
----------------------------------------------------------------------------
XFLOAD "filename.ext"
XFSAVE "filename.ext"
These two instructions ( XFLOAD - e<X>ternal <F>ile <LOAD> and
XFSAVE - e<X>ternal <F>ile <SAVE> ) allow your program to
load-screen-from/save-screen-to external files. These files are always
4000-byte screen images like the .SCN file format sometimes used with
the ShowText drawing program (STD.EXE). The extension MUST be specified
with these instructions, because there is no assumed default extension.
These files are NOT imbedded into the .EXE at compile time as the
files used with the COPY command are. The screen (buffer 0) is the
default source/destination, but you can use the VIRTUAL command to
temporarily point to another buffer as the source for XFSAVE or the
destination for XFLOAD. Please note that NO errors are reported if
these operations fail for any reason. A typical use for these commands
might be to save/load a high-score screen for a game program.
NUMERIC KEYCODE VALUES RETURNED BY THE var=[K] COMMAND
┌─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┐
key │ │SHIFT│ CTRL│ ALT │ key │ │SHIFT│ CTRL│ ALT │
┌───────┼─────┼─────┼─────┼─────┤ ┌───────┼─────┼─────┼─────┼─────┤
│ A │ 65 │ 97 │ 1 │ 158 │ │ ESC │ 27 │ 27 │ 27 │ - │
│ B │ 66 │ 98 │ 2 │ 176 │ │ BKSP │ 8 │ 8 │ 127 │ - │
│ C │ 67 │ 99 │ 3 │ 174 │ │ TAB │ 9 │ 143 │ - │ - │
│ D │ 68 │ 100 │ 4 │ 160 │ │ SPACE │ 32 │ 32 │ 32 │ 32 │
│ E │ 69 │ 101 │ 5 │ 146 │ │ ENTER │ 13 │ 13 │ 10 │ - │
│ F │ 70 │ 102 │ 6 │ 161 │ │ F1 │ 187 │ 212 │ 222 │ 232 │
│ G │ 71 │ 103 │ 7 │ 162 │ │ F2 │ 188 │ 213 │ 223 │ 233 │
│ H │ 72 │ 104 │ 8 │ 163 │ │ F3 │ 189 │ 214 │ 224 │ 234 │
│ I │ 73 │ 105 │ 9 │ 151 │ │ F4 │ 190 │ 215 │ 225 │ 235 │
│ J │ 74 │ 106 │ 10 │ 164 │ │ F5 │ 191 │ 216 │ 226 │ 236 │
│ K │ 75 │ 107 │ 11 │ 165 │ │ F6 │ 192 │ 217 │ 227 │ 237 │
│ L │ 76 │ 108 │ 12 │ 166 │ │ F7 │ 193 │ 218 │ 228 │ 238 │
│ M │ 77 │ 109 │ 13 │ 178 │ │ F8 │ 194 │ 219 │ 229 │ 239 │
│ N │ 78 │ 110 │ 14 │ 177 │ │ F9 │ 195 │ 220 │ 230 │ 240 │
│ O │ 79 │ 111 │ 15 │ 152 │ │ F10 │ 196 │ 221 │ 231 │ 241 │
│ P │ 80 │ 112 │ 16 │ 153 │ │ F11 │ - │ - │ - │ - │
│ Q │ 81 │ 113 │ 17 │ 144 │ │ F12 │ - │ - │ - │ - │
│ R │ 82 │ 114 │ 18 │ 147 │ │ UP │ 2OO │ 2OO │ - │ - │
│ S │ 83 │ 115 │ 19 │ 159 │ │ DOWN │ 2O8 │ 2O8 │ - │ - │
│ T │ 84 │ 116 │ 20 │ 148 │ │ LEFT │ 2O3 │ 2O3 │ 243 │ - │
│ U │ 85 │ 117 │ 21 │ 150 │ │ RIGHT │ 2O5 │ 2O5 │ 244 │ - │
│ V │ 86 │ 118 │ 22 │ 175 │ │ INS │ 210 │ 210 │ - │ - │
│ W │ 87 │ 119 │ 23 │ 145 │ │ DEL │ 211 │ 211 │ - │ - │
│ X │ 88 │ 120 │ 24 │ 173 │ │ HOME │ 199 │ 199 │ 247 │ - │
│ Y │ 89 │ 121 │ 25 │ 149 │ │ END │ 207 │ 207 │ 245 │ - │
│ Z │ 90 │ 122 │ 26 │ 172 │ │ PGUP │ 201 │ 201 │ 101 │ - │
│ 0 or )│ 48 │ 41 │ - │ - │ │ PGDN │ 209 │ 209 │ 246 │ - │
│ 1 or !│ 49 │ 33 │ - │ 248 │ │ - or _│ 45 │ 95 │ 31 │ - │
│ 2 or @│ 50 │ 64 │ 131 │ 249 │ │ + or =│ 61 │ 43 │ - │ - │
│ 3 or #│ 51 │ 35 │ - │ 250 │ │ | or \│ 92 │ 124 │ 28 │ - │
│ 4 or $│ 52 │ 36 │ - │ 251 │ │ { or [│ 91 │ 123 │ 27 │ - │
│ 5 or %│ 53 │ 37 │ - │ 252 │ │ ] or }│ 93 │ 125 │ 29 │ - │
│ 6 or ^│ 54 │ 94 │ 30 │ 253 │ │ : or ;│ 59 │ 58 │ - │ - │
│ 7 or &│ 55 │ 38 │ - │ 254 │ │ " or '│ 39 │ 34 │ - │ - │
│ 8 or *│ 56 │ 42 │ - │ 255 │ │ < or ,│ 44 │ 60 │ - │ - │
│ 9 or (│ 57 │ 40 │ - │ - │ │ > or .│ 46 │ 62 │ - │ - │
│ ` or ~│ 96 │ 126 │ - │ - │ │ ? or /│ 47 │ 63 │ - │ - │
└───────┴─────┴─────┴─────┴─────┘ └───────┴─────┴─────┴─────┴─────┘
┌──────────────────────────────────────────────────────────────────────────────┐
│ SHOWTEXT FADES │
├──────────────────┬┬──────────────────┬┬──────────────────┬┬──────────────────┤
│ O Quick ││19 Spiral CW In ││38 Wipe V Close ││57 Circ Sweep Down│
│ 1 Fizz ││2O Spiral CW Out ││39 Half Wipe V U/D││58 Circ Sweep Up │
│ 2 Melt Down ││21 Spiral CCW In ││4O Half Wipe V D/U││59 Radar CW │
│ 3 Melt Up ││22 Spiral CCW Out ││41 Half Wipe H L/R││6O Radar CCW │
│ 4 Liquid Flow Dn ││23 Mult Sp CW In ││42 Half Wipe H R/L││61 Louver H Large │
│ 5 Liquid Flow Up ││24 Mult Sp CW Out ││43 Checker Down ││62 Louver H Small │
│ 6 Quarters - CW ││25 Mult Sp CCW In ││44 Checker Up ││63 Louver V Large │
│ 7 Quarters - CCW ││26 Mult Sp CCW Out││45 Diagonal Right ││64 Louver V Small │
│ 8 Quarters - Alt ││27 Wipe Down ││46 Diagonal Left ││ │
│ 9 Blks Random Lg ││28 Wipe Up ││47 Chckr Lvr 1step││ │
│1O Blks Random Sm ││29 Wipe Right ││48 Chckr Lvr 2step││ │
│11 Zigzag H Lg Rt ││3O Wipe Left ││49 Diagonal Lvr R ││ │
│12 Zigzag H Lg Lft││31 Curtain H Open ││5O Diagonal Lvr L ││ │
│13 Zigzag H Sm Rt ││32 Curtain H Close││51 Page Feed Down ││ │
│14 Zigzag H Sm Lft││33 Curtain V Open ││52 Page Feed Up ││ │
│15 Zigzag V Down ││34 Curtain V Close││53 Page Feed Right││ │
│16 Zigzag V Up ││35 Wipe H Open ││54 Page Feed Left ││255 selects a │
│17 Orifice Open ││36 Wipe H Close ││55 Circ Sweep CW ││ random fade │
│18 Orifice Close ││37 Wipe V Open ││56 Circ Sweep CCW ││ from this list│
└──────────────────┴┴──────────────────┴┴──────────────────┴┴──────────────────┘
Note: The program FADES.EXE will demonstrate each of these fades.
PROGRAMMING TRICKS AND TIPS
The following pieces of program code will demonstrate a variety of programming
principles. Note that the backslash (\) allows multiple statements on a line.
'TO WAIT FOR A KEYSTROKE - NO MATTER HOW LONG IT TAKES
:CHKIN \ WAITKEY 3600.8,CHKIN
'TO EXECUTE A LOOP UNTIL ANY KEY IS PRESSED
:LOOPIT
'any statements here would be executed once during each loop iteration
WAITKEY 0,LOOPIT
'TO EXECUTE A LOOP UNTIL A KEY (OR MOUSE BUTTON) IS PRESSED WHILE THE CURSOR
'IS WITHIN THE SPECIFIED BLOCK (WHICH IN THIS CASE IS DEFINED USING VARIABLES)
:LOOPIT
'any statements here would be executed once during each loop iteration
WAITKEY 0,LOOPIT \ IF NOT CLK(V1,V2,V3,V4)LOOPIT
'TO EXECUTE A LOOP UNTIL A NUMBER KEY IS PRESSED (ASCII VALUE 48 TO 57)
:LOOPNOW
'any statements here would be executed once during each loop iteration
WAITKEY 0,LOOPNOW \ V0=[K] \ IF V0<48 LOOPNOW \ IF V0>57 LOOPNOW
'TO BUILD A DEMO PROGRAM USING SCREEN FILES DEMO1.STF,DEMO2.STF,DEMO3.STF
'AND DEMO4.STF USING A 3 SECOND DELAY BETWEEN SCREENS (NO FADES) AND ALLOWING
'THE PROGRAM TO TERMINATE WHEN THE ESCAPE KEY IS PRESSED
'NOTE: THIS PROGRAM USES INTERNAL BUFFERS 1 TO 4. (5 AND 6 ARE NOT USED)
ON INTKEY0 ESC GOTO QUIT
COPY(DEMO1,1)\COPY(DEMO2,2)\COPY(DEMO3,3)\COPY(DEMO4,4)
:START\COPY(1,0)\WAIT 3
COPY(2,0)\WAIT 3
COPY(3,0)\WAIT 3
COPY(4,0)\WAIT 3\GOTO START
:QUIT\EXITC
'TO BUILD A DEMO PROGRAM USING SCREEN FILES DEMO1.STF,DEMO2.STF,DEMO3.STF
'AND DEMO4.STF USING A 3 SECOND DELAY BETWEEN SCREENS (NO FADES) AND ALLOWING
'THE PROGRAM TO TERMINATE WHEN THE ESCAPE KEY IS PRESSED
'NOTE: THIS PROGRAM DOES NOT USE ANY INTERNAL BUFFERS
' THIS MEANS MORE DISK ACCESSES ARE NEEDED
ON INTKEY0 ESC GOTO QUIT
:START\COPY(DEMO1,0)\WAIT 3
COPY(DEMO2,0)\WAIT 3
COPY(DEMO3,0)\WAIT 3
COPY(DEMO4,0)\WAIT 3\GOTO START
:QUIT\EXITC
'TO PLACE A MARQUEE WINDOW ON THE SCREEN (WITH A MESSAGE)
COLOR 2,4\WINDOW (11,30,15,50) 104\BFILL 0 (12,31,14,49) ATTR 31
COLOR 15,1\P@13,35\PRINT "HELLO WORLD"
PROGRAMMING TRICKS AND TIPS (continued)
BUFFER TEXT STRINGS
There is a special text string which can reside in any of the internal buffers
(0 to 63) that can be used in place of a quoted string when using PRINT, TTYPE
PLAY , XFLOAD and XFSAVE.
The form of the string is $(buf,row,startcolumn,endcolumn)
where ∙buf is the internal buffer to access (0 to 63)
∙row is the row (1 to 25) where the desired text resides in the buffer
∙startcolumn (1 to 80) and endcolumn (1 to 80) define the starting and
ending column location of the text string
Note that the information can be specified as numbers, variables (V0 to V255)
or indexed variables (VV0 to VV255). If a number greater than 63 is specified,
the value is ANDed with 63 (to keep the value less than 64).
For example:
PRINT $(1,12,35,65) would find the text located in buffer 1 on row 12 starting
at column 35 and ending at column 65. This text would be printed on the
screen in the current default color starting at the print cursor location.
TTYPE $(6,20,1,80) would slow-print the text (in buffer 6, on row 20 between
columns 1 and 80) on the screen.
PLAY $(4,1,40,60) would play the text string (in buffer 4, on row 1 between
columns 40 and 60).
------------------------------------------------------------------------------
USING BUFFERS AS MEMORY
The internal buffers (1 to 63) can also be used as memory if the variables
(V0 to V255) are not enough storage space for data. This method takes a
bit more work, but it can be done. For example,
POKE 6(1,1)ASCII V2 would store a byte in buffer 6 at row=1, column=1
PEEK 6(1,1)ASCII V2 would retrieve the previously stored value.
POKE 6(1,1)ATTR V1 would store a byte in buffer 6 at row=1, column=1
PEEK 6(1,1)ATTR V1 would retrieve the previously stored value.
This means that each internal buffer can store 4000 bytes of program data
because (25 rows x 80 columns) = 2000 bytes. Each row/column position can store
an ASCII character byte and an ATTRibute byte, therefore 2 x 2000 = 4000 bytes.
PROGRAMMING TRICKS AND TIPS (continued)
The following two listings show how to make a "custom" cursor. In the first
example, a white/blue cross-hair symbol (ascii 197) is temporarily placed at
the cursor location but is replaced by the original character a fraction of a
second later. In the second example, the attribute is XORed with 127 to make
the color "flicker". Note: Your program should continuously cycle to the
label (:newcsr) in order to keep redisplaying the custom cursor.
Example 1.
:newcsr %row=[r.] \ %col=[c.] \ csr off
peek 0 (%row,%col) %char %attr
poke 0 (%row,%col) 197 31 \ wait .09
poke 0 (%row,%col) %char %attr \ wait .09 \ waitkey 0,newcsr
'you can test key or click values here
Example 2.
:newcsr %row=[r.] \ %col=[c.] \ csr off
peek 0 (%row,%col) attr %attr
poke 0 (%row,%col) attr %attr#127 \ wait .09
poke 0 (%row,%col) attr %attr \ wait .09 \ waitkey 0,newcsr
'you can test key or click values here
##############################################################################
The following program listing is an alternative to the TEXT INPUT command.
It is included here in order to further demonstrate the use of ALIASes.
'------ MAIN PROGRAM ------------------------------------------------------
ALIAS %ROW=V200,%COLUMN=V201
COLOR 14,1 \ %ROW=10 \ %COLUMN=1 \ GOSUB INPUT
EXIT
'--------------------------------------------------------------------------
'------ SUBROUTINE --------------------------------------------------------
:INPUT\ CSR \ C@ %ROW,%COLUMN \ P@ %ROW,%COLUMN \ WAITKEY 0,INPUT
IF [K]=13 INPTX \ IF [K]=8 INPT2
:INPT1\ PRINT CHAR([K]); \ %COLUMN=[C;] \ GOTO INPUT
:INPT2\ %COLUMN-- \ POKE 0 (%ROW,%COLUMN)ASCII 32 \ GOTO INPUT
:INPTX\ RET
'--------------------------------------------------------------------------
##############################################################################
This short program segment shows how to link several screens together (e.g.
a HELP section). The HELP screens are loaded into the upper buffers
(6O through 63). The Page-Up and Page-Down keys will sequentially cycle through
these buffers. The Enter key provides a way to exit this routine.
V1=6O \ COPY(HELP1,6O) \ COPY(HELP2,61) \ COPY(HELP3,62) \ COPY(HELP4,63)
:COPY\ COPY(V1,0)
:INPT\ WAITKEY \ IF KEY PGUP DECR \ IF KEY ENTER QUIT
IF KEY PGDN INCR \ GOTO INPT
:DECR\ IF V1=6O INPT \ V1=V1-1 \ GOTO COPY
:INCR\ IF V1=63 INPT \ V1=V1+1 \ GOTO COPY
:QUIT\ EXITC
PROGRAMMING TRICKS AND TIPS (continued)
The new version of ShowText will allow the programmer to use row values
greater than 25 (up to 255). This means that up to ten screens can be linked
together as though they were part of a large screen having 25O rows. This also
means that programmers have access to certain "undocumented" buffers outside
the O to 63 range. These are accessed by using extended row values.
┌──────┬────┬────┬────┬────┬──────────────────────────────────────────────────┐
│buffer│row1│col1│row2│col2│ Description │
╞══════╪════╪════╪════╪════╪══════════════════════════════════════════════════╡
!│ O │ 26 │ 1 │ 5O │ 8O │ CGA,EGA,VGA video page 1 (text mode) │
├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
│ O │ 51 │ 1 │ 75 │ 8O │ CGA,EGA,VGA video page 2 (text mode) │
├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
│ O │ 76 │ 1 │1OO │ 8O │ CGA,EGA,VGA video page 3 (text mode) │
├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
│ O │1O1 │ 1 │125 │ 8O │ CGA,EGA,VGA video page 4 (text mode) │
├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
│ O │126 │ 1 │15O │ 8O │ CGA,EGA,VGA video page 5 (text mode) │
├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
│ O │151 │ 1 │175 │ 8O │ CGA,EGA,VGA video page 6 (text mode) │
├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
│ O │176 │ 1 │2OO │ 8O │ CGA,EGA,VGA video page 7 (text mode) │
╞══════╪════╪════╪════╪════╪══════════════════════════════════════════════════╡
*│ 63 │ 26 │ 1 │ 5O │ 8O │ temporary - holds last screen loaded from a file │
├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
*│ 63 │ 51 │ 1 │ 75 │ 8O │ temporary - holds misc. I/O from last file load │
├──────┼────┼────┼────┼────┼──────────────────────────────────────────────────┤
│ 63 │ 76 │ 1 │1OO │ 8O │ temporary - used only by SAVE/RESTORE │
└──────┴────┴────┴────┴────┴──────────────────────────────────────────────────┘
! Note: The ShowText menu program (ST.EXE) stores a 96-byte configuration block
containing project name, path etc. at the end of video page O. (row 26)
If your program uses this area, it will be necessary for you to re-type
the project name when you exit back to the ShowText menu. It only
occurs when you are in the interactive ShowText environment. This is a
minor inconvenience and not a serious problem.
* Note: The COPY(source,destination) performs a screen-file-load if source is
a name (not a variable or number). e.g. COPY(filename,7)14
The first temporary buffer (bfr=63 row=26 to 5O) is overwritten only
if a non-zero fade is specified on the screen-file-load COPY command.
SHOWTEXT Revision History:
O9/24/1994 - v 1.2
+ Added new system variables: [AS:buf:row:col] , [AT:buf:row:col] and [VIRT]
+ Added the XFLOAD and XFSAVE commands.
+ Fixed a bug in the PLAY command (from v 1.1).
+ Added the ability to specify buf=0 in the $(buf,row,col1,col2) text string
O7/O8/1994 - v 1.1
+ Added ARROWS ON and ARROWS OFF commands
+ Added the ability to use row>25 and/or col>80 for most operations
+ Added IF-THEN-ELSEIF-ELSE-ENDIF
+ Added SELECT CASE\CASE\CASE ELSE\END SELECT
+ Added DO\LOOP
+ Added WHILE\WEND
+ Added support for embedded mathematics expression evaluation including
nested parentheses.
+ Added new mathematics operators: ^ } ++ --
+ Added comparison operators: < = > <= <> >=
+ Added logic operators: NOT, AND, OR, XOR, NAND, NOR, XNOR
(`) (&) (@) (#) (_) (|) (~)
+ Added several new system variables
(e.g. [OVR] and [.r1:c1:r2:c2] and [r1:c1:r2:c2.] )
+ Changed the way that system variables are accessed.
(ex: old-way SYS v1 KEY \ if v1=27 quit )
(ex: new-way if [K]=27 quit )
O5/15/1994 - v 1.O
+ Original public release as shareware.
───────────────────────────────────────────────────────────────────────────────
MISCELLANEOUS PROGRAMS:
GETAKEY.COM-This program pauses a batch file until a key is pressed. The
ASCII value of that key is returned as the DOS ERRORLEVEL.
Extended keys such as F1 etc. are returned as 128+scan_code.
These values are the same as the values in the keycode table in
SHOWTEXT.DOC (except that F11 and F12 are not supported). This
program was meant to be used in batch files using self-displaying
.COM files (with ECHO OFF) or with the SHOW.COM program..
───────────────────────────────────────────────────────────────────────────────
SHOW.COM - This program will display an .STF file on the screen. It may be used
in a batch file. The syntax is SHOW filename or SHOW/P filename .
Note that an extension must not be specified on the command line.
The first syntax form (SHOW filename) will display the filename.STF
on the screen and will continue. The second form (SHOW/P filename)
will display the filename.STF on the screen and will then pause
until the user presses a key. The ASCII value of that keystroke
(or 128+scan_code_value for extended function keys) will be placed
in the DOS ERRORLEVEL variable which can then be tested inside a
batch file. This can be used in a simple batch file menu system.
SHOWTEXT REGISTRATION ORDER FORM
(The REGISTERED version does not generate the initial UNREGISTERED banner
and includes a text-screen capture program and a program to convert drawing
files between the following forms: .ANS=(ANSI) .ASC=(Plain ASCII Text)
.BSV=(Basic's BSAVE/BLOAD) .COM=(stand-alone executable) .SCN=(4OOO byte
screen image) and .STF=(ShowTextFile format).
Name ____________________________________________________
Address ____________________________________________________
____________________________________________________
____________________________________________________
Please specify the version of ShowText you are using and where you got it.
Version ____________ Source ____________________
NOTE: SHOWTEXT is distributed on high-density disks ONLY !!!
Disk Type (check one) [ ] 5.25" (1.2 Meg) or [ ] 3.5" (1.44 Meg)
Please make check/money order ( $ 25.OO ) to: Garry Spencer/Spencer Technologies
and mail to: Garry Spencer/Spencer Technologies
P. O. Box 34OO9 - Memphis, TN - 38184-OOO9
Please do not send cash. Please allow 3 to 4 weeks for delivery.
Licensing Information and Disclaimer:
------------------------------------------------------------------------------
O.K. , here's the deal:
Many hours have been spent on the design and programming of the ShowText system.
(This is an understatement :-). Every command has been carefully tested,
HOWEVER Spencer Technologies/Garry Spencer and any operating principals of the
company are not liable for the use of this software.
Upon receipt of your registration fee, you will be sent the latest REGISTERED
version of ShowText. The REGISTERED version will be in a sealed package.
EACH diskette is checked for readability before shipping! When the REGISTERED
version is opened and the seal is broken, it may NOT be returned and remitted
funds are NOT refundable.
You will be issued a unique registration code which entitles you to technical
support (up to two requests by MAIL only). This explains why the registration
fee is so low, compared to other packages costing nearly $100 (or more).
Please consider the cost of duplication, handling, postage, taxes, pizza etc.
Please sign below if you agree with the terms and limitations of this license
agreement. Only signed order forms can be processed. Thank you for ordering
ShowText.
Signature _____________________________