home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 26
/
CD_ASCQ_26_1295.iso
/
vrac
/
shwtxt19.zip
/
SHOWTEXT.DOC
< prev
next >
Wrap
Text File
|
1995-09-12
|
125KB
|
2,300 lines
┌────────────────────────────────────────────┐
│ │
│ S H O W T E X T │
│ │
└────────────────────────────────────────────┘
VERSION 1.9
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 SHWTXT19.ZIP where
(19) indicates version (1.9) .
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. These values
are 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 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 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 TEST1234
∙∙∙(other statements skipped)∙∙∙
:TEST1234 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\EXIT
CLS 7,0
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
%A=3 'set %A to 3 \ %B=7 'set %B to 7
------------------------------------------------------------------------------
When a compiled .EXE is executed, the DOS command line is placed in
buffer 1 (row=1,col=1) with its length stored as the <attribute> of the
character in buffer 1 (row=3,col=1). The directory of the current EXE
file is stored in buffer 1 (row=4,col=1) with its length stored as the
<attribute> of the character in buffer 1 (row=5,col=1). The trailing
backslash (\) is always the last character in the EXE-directory string.
Note: No capitalization is performed on either string.
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
------------------------------------------------------------------------------
;minvalue,variable,maxvalue
;minvalue,variable,maxvalue;minvalue,variable,maxvalue ....etc....
This statement forces the variable to be within the specified range
(minvalue to maxvalue (inclusive)). More than one variable can be forced
on the same program line by using another semi-colon (;). Obviously only
normal variables and indexed variables can be forced, although the
minimum and maximum values can be any type of standard value. If either
of the limits are omitted, the defaults are minvalue=0 and maxvalue=255.
Example: ;5,%row,25 ;10,%col,70 'forces 5 <= %row <= 25
' and 10 <= %col <= 70
------------------------------------------------------------------------------
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.
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.
------------------------------------------------------------------------------
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 (for printing) 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 base colors)
Note: There is a difference between the organization of the
attribute-byte (above) and the values used with the COLOR statement,
in relation to the coding of the blink bit.
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).
Note that the program will pause briefly until the beep is finished.
------------------------------------------------------------------------------
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
-------------------------------------------------------------------------------
BMOD buffer (row1,col1,row2,col2) ANDmask, ORmask, XORmask
The Block-MODify-attributes instruction causes the color attributes
in the specified "block" (or "box") in the selected buffer to be
ANDed with the ANDmask, ORed with the ORmask, and XORed with the
XORmask (in that order). If a mask value is omitted, its default value
will be used. The defaults are ANDmask=255, ORmask=0 and XORmask=0.
ex: BMOD 0 (1,1,25,80),8 'turn BOLD ON for entire screen
BMOD 0 (1,1,25,80)247 'turn BOLD OFF for entire screen
BMOD 0 (1,1,25,80),128 'turn BLINK ON for entire screen
BMOD 0 (1,1,25,80)127 'turn BLINK OFF for entire screen
ex: BMOD 0 (1,1,25,80),,255 \ WAIT .2 \ BMOD 0 (1,1,25,80),,255
'This will "flash" the screen
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
-------------------------------------------------------------------------------
CALL subroutine (val1,val2,...etc...) var1,var2,...etc...
└───┬────┘ └────────┬────────┘ └────────┬────────┘
label calling arguments returning arguments
are PUSHed on stack are POPped off stack
{any type of value} {normal (non-indexed) variables}
This instruction calls a subroutine by actually using the following:
PUSH val1,val2,...etc...\GOSUB subroutine\POP var1,var2,...etc...
Both the calling arguments (PUSHed onto the stack) and the returning
arguments (POPped off the stack) are optional. The subroutine itself must
actually POP the calling arguments off the stack and PUSH the returning
arguments onto the stack - IN THE OPPOSITE ORDER - from the order of the
list in the CALL statement. Note that the subroutine is in the same
memory block as the rest of the program, i.e. its variables are still
global in nature (not local to the subroutine). The number of arguments
in either list can vary.
Example: CALL Temp (1,V2,VV3,V4+5) V6,V7,V8
would be equivalent to:
PUSH 1,V2,VV3,V4+5 \ GOSUB Temp \ POP V6,V7,V8
The subroutine could then access the info (in reverse order!) as follows:
Temp: POP %Arg4, %Arg3, %Arg2, %Arg1
∙∙∙
∙∙∙this would make %Arg1=1, %Arg2=V2, %Arg3=VV3, %Arg4=V4+5
∙∙∙
∙∙∙perform the necessary actions∙∙∙
∙∙∙
PUSH %Arg8, %Arg7, %Arg6
∙∙∙
∙∙∙after RETurn this would make V6=%Arg6, V7=%Arg7, V8=%Arg8
∙∙∙
RET
Important Note:
If the compiler detects an error when evaluating a CALL instruction,
the instruction is shown as PUSH ... \ GOSUB ... \ POP ... because the
CALL instruction is mapped into these equivalent instructions before
it is evaluated. This saved quite a bit of compiler code to do it this
way :-)
See the PUSH, POP and GOSUB instructions for more information.
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. Note that
the print cursor is set to row=1 and column=1. See the table of colors
for the COLOR command.
ex: 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
(for printing, CLS etc). The first form changes only the foreground
while the second form changes both the foreground and background colors.
Foreground (fg) Background (bg)
------------------ --------------------
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 │Note: Text can be made to blink by │
11 bright cyan (blue-green) │adding 16 to the foreground color. │
12 bright red │For example: using 4=red and 3=cyan │
13 bright magenta (purple) │COLOR 4,3 'normal red fg and cyan bg│
14 bright yellow │COLOR 20,3 'blink red fg and cyan bg│
15 bright white └──────────────────────────────────────┘
COPY (source,destination)
COPY (source,destination) optionalfade
COPY ( $(buffer,row,column1,column2) , destinationbuffer) optionalfade
This instruction is the heart of the ShowText system. In all 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 (or virtual screen)
1 to 63 which are internal buffers
variables V0 TO V255
indexed variables VV0 to VV255.
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, number or math operation (e.g. 123,V123,VV123,TEST-123,
ABC&DEF etc.) since the compiler would assume that you meant to use an
actual variable, number or math operation as the source buffer number.
The reserved math operator symbols + - * / ~ ^ < = > ` & @ # | MUST NOT
be used as part of a filename in the COPY(filename,bfr) instruction.
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, V1=4 \ COPY (V1,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.
The third form of this instruction is used to search the internal library
directory for the filename (8 characters) which is specified by the
buffer text string. The EXTRA variable is set to 255 if the search is
successful and is reset to zero if this command fails to find the
filename in the internal library directory. Please refer to the $LIB ADD
compiler directive for information about making sure that certain files
are placed in the internal library. Note: The filename, that is used
with the third form, MUST be in uppercase format (ex: FILENAME). The
internal directory is maintained in UPPERcase format.
ex: COPY ( $(63,1,12,19) , 2 ) 55 would search the internal library
directory for the filename specified in the buffer text string located
in buffer 63 on row 1 between columns 12 and 19. If the filename is
found, it would be copied to buffer 2 using fade 55.
CSR LIM (toprow , leftmostcolumn , bottomrow , rightmostcolumn)
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
ShowText Language - Special Directory Commands
DIRTOP
DIRBOT
DIRPRV
DIRNXT
DIRCMP or DIRCMP "filename" or DIRCMP $(bfr,row,startcolumn,endcolumn)
DIRCPY buffer,fade
DIRFND "filename" or DIRFND $(bfr,row,startcolumn,endcolumn)
DIRPRT buffer,row,column,attribute
If the compiled program, in .EXE form, contains any imbedded screen text files,
then an internal directory of these 8-character filenames is maintained by the
program (in alpha sort order). These commands (above) allow limited access to
this area.
A directory pointer is also maintained, although its exact value is not
available, since up to 2048 screen files can be stored; but all variables have
a maximum value of 255. The [DIR] system variable returns information ABOUT the
internal directory pointer but not its actual value. These return values are:
0=no files in directory
1=now pointing to first directory entry (i.e. after DIRTOP cmd)
2=now pointing to last directory entry (i.e. after DIRBOT cmd)
3=pointing to first and last directory entry (i.e. only 1 file in library)
4=now pointing to somewhere between first and last entries
The DIRTOP instruction places the directory pointer at the top (first) entry.
The DIRBOT instruction places the directory pointer at the bottom (last) entry.
The DIRPRV instruction places the directory pointer at the previous entry,
unless the directory pointer was already pointing at the top (first) entry.
The DIRNXT instruction places the directory pointer at the next entry,
unless the directory pointer was already pointing at the bottom (last) entry.
Note: The [DIR] system variable is updated each time any of these four
instructions are executed.
The DIRCMP instruction CoMPares the specified text "filename" with the current
directory entry (stored internally in memory). If these match, the EXTRA system
variable [X] is set to 255, otherwise it is reset to zero. The question-mark (?)
can be used as a wildcard in the "filename" text string. This text string must
be from 1 to 8 characters in length, and only the number of characters in the
text string will be compared.
Note that the buffer text string $(bfr,row,startcol,endcol) can be used as the
comparison text, although the filename MUST be in UPPERcase form (e.g.FILENAME)
ex#1: DIRCMP "ABC" if the first 3 characters of the internal directory
entry are ABC, then [X]=255 otherwise [X]=0.
ex#2: DIRCMP "ABC??XYZ" if the first 3 characters of the internal directory
entry are ABC and the last 3 characters are XYZ, then
the EXTRA system variable [X]=255 otherwise [X]=0.
ex#3: DIRCMP $(0,12,1,8) compares the text (that resides in buffer 0, on row 12,
between columns 1 and 8) with the internal directory
entry. If it matches, [X]=255 otherwise [X]=0.
Note: If DIRCMP is used without an operand, it uses the LAST text specified.
ShowText Language - Special Directory Commands - (continued)
The DIRCPY instruction is used to CoPY the file, currently being pointed to
by the directory-entry-pointer, into the specified buffer, using the specified
fade value. Note: the fade value must be specified. If no fade is desired,
simply use a fade value of zero.
Ex: DIRTOP
DIRCPY 0,2
'would copy the first file (in the internal library directory)
'into buffer 0 (the screen) using the melt-down fade (#2).
The DIRFND attempts to FiND the specified filename in the internal library
directory. If it is successful, the EXTRA system variable [X] is set to 255,
otherwise it is reset to zero. The directory-entry-pointer is positioned
at the specified entry (if found), otherwise it is placed at the position
that would have been occupied by the specified entry. Note that NO wildcards
are permitted with this instruction and that the specified filename must be
8 characters in length, otherwise it will be right-padded with spaces.
The DIRPRT instruction PRinTs the 8-character internal directory-entry filename
using the specified buffer, row, column and attribute information.
ex: DIRPRT 0,25,21,31 prints the 8-character internal directory-entry filename
to buffer 0, on row 25, starting at column 21, using an
attribute value of 31 (bright white on blue).
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
Special Note: The GOLOOP instruction can be used to perform a GOTO to
the next LOOP instruction as if a label was assigned to it. The
EXITDO/XDO instructions can be used to perform a GOTO to the instruction
immediately following the next LOOP instruction. These instructions will
properly handle nested DO/LOOPs, so that a GOLOOP (or EXITDO or XDO) in
an outer loop will seek the appropriate LOOP instruction.
-------------------------------------------------------------------------------
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 {or X}
EXITC {or XC}
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, and the DOS
cursor is set to the last row value of the print cursor. If you wish
to end a program with the screen cleared and with the DOS cursor at
row 1, then use the command EXITC.
FOR loop_var = loop1 to loop2 STEP loop3 {pos.steps loop1<=loop2 )
FOR loop_var = loop1 to loop2 NSTEP loop3 {neg.steps loop1>=loop2 }
NEXT loop_var
(where the loop variable (loop_var) must be a variable V0 to V255,
or an ALIASed variable (e.g. %i) 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: Do NOT jump from the outside of a FOR/NEXT loop into the inside!
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.
Special Note: The GONEXT instruction can be used to perform a GOTO to
the next NEXT instruction as if a label was assigned to it. The EXITFOR
instruction can be used to perform a GOTO to the instruction immediately
following the next NEXT instruction. These instructions will properly
handle nested FOR/NEXT loops, so that a GONEXT (or EXITFOR) in an outer
loop will seek the appropriate NEXT instruction.
------------------------------------------------------------------------------
GOTO label {or GT 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 {or GS 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.
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.
Buffer 0=screen and buffer 1 through 63 are internal buffers.
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
(note: a math expression for timer number is NOT allowed here)
(note: The >= and < comparison operators are the ONLY ones allowed)
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)
INTKEYS ON (default setting)
INTKEYS OFF
INTKEYS CLEAR
The INTKEYS ON command allows the program to check for any defined
interrupt key presses between statements. The INTKEYS OFF command
turns the interrupt key checking off (although it does NOT change
any of the interrupt key definitions). The INTKEYS CLEAR command
clears all 16 of the interrupt key definitions, but does not affect
the ON/OFF status of interrupt key checking.
ex: INTKEYS ON 'turns checking ON
INTKEYS OFF 'turns checking OFF
INTKEYS CLEAR 'clears all definitions-checking status unchanged
INTKEYS CLEAR ON 'clears all definitions and turns checking ON
INTKEYS CLEAR OFF 'clears all definitions and turns checking OFF
** See the ON INTKEY command for more information.
--------------------------------------------------------------------------------
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, 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.
----------------------------------------------------------------------------
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
MOUSE ON {or simply MOUSE}
MOUSE OFF
These instructions enable or disable the ability to allow the mouse
to move the cursor and/or simulate a keypress.
----------------------------------------------------------------------------
ON INTKEYn key GOSUB label
ON INTKEYn key GOTO label
where n can be 0 to 15 and key is a specified key code
These instructions allow the programmer to specify up to 16 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.
NOTES:
1. 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.
2. The interrupt keys are normally checked between each statement.
If the NOCHK mode is selected, the only time that the interrupt
keys are checked is when a WAIT or WAITKEY command is executed.
e.g. ON INTKEY0 CTRL C GOTO QUIT
ON INTKEY15 F1 GOSUB HELP
∙
∙ (other statements)
∙
:HELP
∙
∙ (other statements)
∙
RET
∙
:QUIT \ EXITC
When using the GOSUB option, it is a good idea to SAVE the screen
and then RESTORE it prior to executing a RETurn. The command
ON INTKEYn NULL will effectively disable an interrupt key definition.
It can be enabled again later.
** See the INTKEYS command for additional information.
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+ (default)
P-
The P+ instruction enables the color attribute for printing, which means
that all printing is done in the current foreground/background colors.
The P- instruction disables the color attribute for printing, which means
that all printing uses the colors (already on the screen) at the current
print cursor location. The selected setting stays in effect until
cancelled by the opposite instruction.
example: P+ \ ! "test" 'print using current colors
P- \ ! "1234" 'print using colors already on the screen
--------------------------------------------------------------------------------
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"
Note: The ShowText PLAY command does NOT allow the playing of background
music, therefore your program will -halt- while the music plays!
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 valuelist {numbers,variables,indexed variables,expressions}
POP variablelist {only normal (non-indexed) variables allowed}
These instructions PUSH/POP values 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,V2,V3+1 PUSHes the number 1, variable V2 and
expression V3+1 (evaluated) onto the stack.
PUSH V1,V5:V7,V9:V12 is the same as PUSH V1,V5,V6,V7,V9,V10,V11,V12
and should be followed later in the program by:
POP V12:V9,V7:V5,V1 because values are POPped off the variable stack
in the opposite order in which they were PUSHed
onto the stack.
The colon (:) is used to specify a range of variables. Only normal
variables can be used when the colon (:) is specified.
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.
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 (n=0 to 15 or math expression)
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 number 15 to zero
RST T%i would reset timer number %i 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 (buffer 66).
RESTORE fade
Restores the screen from the special buffer area (with an optional fade).
Note: The SAVE/RESTORE combination not only saves and restores the
screen itself, but also saves and restores nearly ALL screen parameters
such as screen-cursor (location, limits, scan-lines, ON/OFF state),
print-colors, print-cursor location and limits, P+/P- status etc.
Note: The following are some of the parameters that are NOT preserved:
ARROWS ON/OFF state, CHK/NOCHK state, INTKEYS ON/OFF state,
ON INTKEY definitions and VIRTUAL state.
This is useful before and after a (WINDOW / user input) routine.
ex: SAVE\CLS\RESTORE 1 'save-screen,clear-screen,restore-screen w/fade=1
-------------------------------------------------------------------------------
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.
ex: SCREENSAVER 1 'would active screen-saver after 1 minute of 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] ( cursor visibility status 0=Cursor OFF and 255=cursor ON)
[CSR] ( same as [CV] )
[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
[ARROWS] returns 0 if arrows are off, 255 if arrows are on
[CHK] returns 0 if NOCHK, 255 if CHK
[INTK] returns 0 if INTKEYS are off, 255 if INTKEYS are on
[BIOSn] returns the value of the byte located at (decimal) offset n from
the start of the BIOS data area (in low memory at 0040:0000h)
(see the appendix for more information about this area)
[POP] pops a value of the variable stack and uses it in expression
[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: "n" can also be a math expression e.g. [T%i+1]
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)
[DIR] returns the state of the internal directory pointer
0=no files in directory
1=now pointing to first directory entry (i.e. after DIRTOP cmd)
2=now pointing to last directory entry (i.e. after DIRBOT cmd)
3=pointing to first and last entry (i.e. only 1 file in library)
4=now pointing to somewhere between first and last entries
┌────────────────────────────────────────────────────────────────────┐
│ 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 ) │
└────────────────────────────────────────────────────────────────────┘
System variables - continued
[.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
[F:buf:row:col] returns the foreground color (0 to 31) of the character
located in buffer "buf" at the specified row and column
[B:buf:row:col] returns the background color (0 to 7) of the character
located in buffer "buf" at the specified row and column
[FB:fg:bg] returns the corresponding attribute value of the specified
foreground and background colors.
e.g. [FB:31:1] uses 31=(blinking bright white foreground) and
1=(blue background)
returns 159 (see ATTR and COLOR commands for values)
The commands COLOR 31,1 and ATTR [FB:31:1] are equivalent.
[IR:lowval:testval:highval] returns 255 if testval is in specified range
└─(I)n-(R)ange test returns 0 if not in range
[;lowval:testval:highval] returns a value within the specified range.
│ ┌─────────────────────────────────────────┐
└─────────────┤ if testval<lowval then returns lowval │
│ if testval>highval then returns highval │
│ otherwise returns testval as-is │
└─────────────────────────────────────────┘
Note: All 3 items -must- be specified, because
no defaults are assumed.
[TM:lowval:timer#:highval] checks to see if specified timer is in-range
returns 255 if specified timer(in ticks) is InRange , 0 if not
e.g [TM:25:7:35] checks the ticks-value of timer number 7 to see if it
is between 25 and 35 inclusive.
>>> Note the use of colons (:) instead of commas (,) in some of these
system variables. This makes parsing of the command 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 (logical NOT) note:symbol is ascii 96
var=val&val (logical AND)
var=val@val (logical OR)──────┬──alternate OR symbols
var=val|val (logical OR)──────┘
var=val#val (logical XOR)
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)
however you must remember that there are NO negative values in ShowText.
This means that %A = 3-2 is NOT the same as %A= -2+3 .
The EXTRA variable's value is set by the LAST math operation performed.
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 {or WT}
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 {or WK seconds}
WAITKEY seconds,label {or WK seconds,label}
WAITKEY {or WK}
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
Special Note: The GOWEND instruction can be used to perform a GOTO to
the next WEND instruction as if a label was assigned to it. The
EXITWHILE/XWHILE instructions can be used to perform a GOTO to the
instruction immediately following the next WEND instruction. These
instructions will properly handle nested WHILE/WEND loops, so that a
GOWEND (or EXITWHILE or XWHILE) in an outer loop will seek the
appropriate WEND instruction.
----------------------------------------------------------------------------
WINDOW (row1,col1,row2,col2) windowtype
WINDOW (row1,col1,row2,col2) windowtype,attribute
The first instruction will draw a window (with 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 windowtype value 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.
The second form allows an optional attribute value. See ATTR command.
XBLOAD "filename.ext"
XBSAVE "filename.ext"
These two instructions ( XBLOAD - e<X>ternal <B>lock <LOAD> and
XBSAVE - e<X>ternal <B>lock <SAVE> ) allow your program to
load/save entire blocks of buffers, variables, and screen settings.
The XBSAVE instruction requires your program to push various
data items onto the variable-stack prior to executing the XBSAVE itself.
A short example will show how this is done. Suppose you wish to store
3 buffers (17,29 & 45) in an external file; here is how this can be done:
PUSH 17 ───┐
PUSH 29 ├─push the buffer number of each buffer to save
PUSH 45 ───┘
PUSH 3 ──────push the total number of buffers to save
PUSH 0 ──────last of all, push the MODE onto the stack
XBSAVE "TEMPFILE.DAT" ────store the buffers in file: TEMPFILE.DAT
The MODE value is the last item pushed onto the variable-stack, and
has the following value:
MODE in MODE in MODE
---binary------ --decimal-- ---function----------------------------
0 0 0 0 0 0 0 0 0 do not store variables or screen-status
0 0 0 0 0 0 0 1 1 store variables
0 0 0 0 0 0 1 0 2 store screen-status
0 0 0 0 0 0 1 1 3 store variables and screen-status
│ └───if 1 then store ALL variables (V0 to V255) in file
└─────if 1 then store screen-status in file
Note: The specified buffers are always stored, regardless of MODE value.
>>Special care must be used in saving and reloading the variables.
When the compiler encounters an alias-name (e.g. %TEMP) that has not been
referenced before, it looks at the alias list until it finds a variable
(V0 to V255) that has not been aliased. The alias-name is then assigned
to this unaliased variable, and the alias table is updated so that the
next time this alias-name is encountered, it will know what variable to
replace it with. When the XBSAVE instruction is told to save the
variables, it saves ALL of them (V0 to V255) without saving the aliases
that were assigned to them. Therefore, whenever you plan to use the
XBSAVE to save the variables, you M-U-S-T use the ALIAS command (at the
beginning of the program) to explicitly assign critical alias names.
This must be done in the program that saves the variables and also in the
one that reloads them. This allows proper alignment of alias-names and
variables after the XBLOAD is executed. You can use the PUSH/POP
instructions to preserve and restore the non-critical variables, so that
the XBSAVE/XBLOAD does not overwrite local or auto-aliased variables.
>>The screen-status values that are currently capable of being saved, and
then restored, are: screen-cursor (location, limits, scan-lines, ON/OFF
state), print-colors, print-cursor (location, limits, P+/P- status).
The following are some of the parameters that are NOT preserved:
ARROWS ON/OFF state, CHK/NOCHK state, INTKEYS ON/OFF state, ON INTKEY
definitions and VIRTUAL state. All things considered, avoid storing
variables or screen-status unless it is absolutely necessary.
The XBLOAD command does not require any setup prior to execution, because
all data is restored from the file just as it was written. The EXTRA
system variable [x] is set to 255 if an error occurred or is reset to
zero if no error occurred (in opening the specified disk file).
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
screen images like the .STF file format. 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. The EXTRA system variable is set to 255 if an
error occurred or is reset to zero if no error occurred (in opening the
specified disk file).
>>>Note: All ASCII zero and ASCII 255 characters, on the screen
(or virtual screen), are converted to ASCII 32 (space) characters (in the
output file) when the XFSAVE instruction is called.
>>>Note: Do NOT use buffer number 65 as the virtual screen, when using the
XFSAVE/XFLOAD instructions, because it is a reserved area used to process
these two instructions.
Examples:
XFSAVE "TEMP.STF" 'saves screen (or virtual screen) to TEMP.STF
XFLOAD "TEMP.STF" 'loads screen (or virtual screen) from TEMP.STF
If you want to save/load to a screen (%buffer) other than the visible
screen and you don't want to alter the virtual setting, then do this:
PUSH [VIRT] \ VIRT %buffer \ XFSAVE "TEMP.STF" \ VIRT [POP]
PUSH [VIRT] \ VIRT %buffer \ XFLOAD "TEMP.STF" \ VIRT [POP]
Compiler Directives
--------------------------------------------------------------------------------
$BUFFERS nn {where nn=1 to 63}
This compiler directive specifies the number of internal screen buffers
to allocate when the compiled application is started. The default is 63.
Specifying a smaller number of buffers will use less memory. Note that
this directive can only be used once in a program. Unused buffers are
mapped to the view-screen memory area. The minimum is 1 internal buffer.
Special buffers (64 to 66) and (67 to 73) are still valid. For example,
$BUFFERS 3 'means that internal buffers 1,2 and 3 are allocated
'normally; buffers 4 through 63 are mapped to the view-screen
--------------------------------------------------------------------------------
$DOS command
This compiler directive SHELLs to DOS, executes the command, then returns
to the compiler to finish compiling the remainder of the program.
Note: This is a compiler directive and NOT a programming instruction.
Ex: $DOS dir *.*
--------------------------------------------------------------------------------
$LIB ADD filespec
$LIB ADD filespec1,filespec2,...,...,filespecN
The COPY(sourcefile,destinationbuffer)fade command automatically adds the
specified sourcefile.STF to the internal library.
The $LIB ADD directive was added to aid in the use of the
COPY ( $(bfr,row,col1,col2), dest)fade command, because this form of
the COPY command performs a filename search on the internal library
directory. The $LIB ADD directive is used to make sure that all needed
files are added to the internal library.
The $LIB ADD directive will add all files (matching the filespec(s)
in the current directory) to the internal library. The default (and
only) allowable extension is .STF. Note that ALL files must be in
the CURRENT directory. NO drives:\directories can be specified!
Note: See the $LIB DIR directive to find out how to override the default
(current) directory used to store .STF files.
Ex: $LIB ADD *.STF
'adds all .STF files in the current directory
----------------------------------------------------------------------------
$LIB DIR "directoryname"
This optional directive changes the directory that is used to access the
.STF files. It should only be done once and it can only be done BEFORE
any .STF files are added to the internal library. Note that the
double-quotes (") MUST be used because the backslash (\) is normally
used to start a new program line.
Ex: $LIB DIR "\TEMP"
'followed by
$LIB ADD *.STF
'would load all .STF files in the \TEMP directory (i.e. \TEMP\*.STF)
SPECIAL SHORTCUT PREFIX COMMANDS
┌───────────────┬───────────────┬───────────────┐
│ + │ - │ . │
┌──────┼───────────────┼───────────────┼───────────────┤
│ a │ ARROWS ON │ ARROWS OFF │ ARROWS ON │
├──────┼───────────────┼───────────────┼───────────────┤
│ c │ CSR ON │ CSR OFF │ CSR ON │
├──────┼───────────────┼───────────────┼───────────────┤
│ i │ INTKEYS ON │ INTKEYS OFF │ INTKEYS CLEAR │
├──────┼───────────────┼───────────────┼───────────────┤
│ k │ CHK │ CHK OFF │ RST K │
├──────┼───────────────┼───────────────┼───────────────┤
│ m │ MOUSE ON │ MOUSE OFF │ MOUSE ON │
├──────┼───────────────┼───────────────┼───────────────┤
│ p │ P+ │ P- │ P+ │
├──────┼───────────────┼───────────────┼───────────────┤
│ s │ RST S │ RST S │ RST S │
├──────┼───────────────┼───────────────┼───────────────┤
│ t?? │ RST T?? │ RST T?? │ RST T?? │
├──────┼───────────────┼───────────────┼───────────────┤
│ v??? │ V???++ │ V???-- │ V???=0 │
├──────┼───────────────┼───────────────┼───────────────┤
│ x │ C@[R.],[C.]+1 │ C@[R.],[C.]-1 │ C@[R.],1 │
├──────┼───────────────┼───────────────┼───────────────┤
│ y │ C@[R.]+1,[C.] │ C@[R.]-1,[C.] │ C@1,[C.] │
└──────┴───────────────┴───────────────┴───────────────┘
The ShowText programming language supports special shortcut commands which
are prefixed by (+), (-) or (.). Several of these commands can be placed in
the same program statement. The table above shows the action taken when each
letter is preceded by one of the three prefixes. Note that the variables
(V???) must be normal (non-indexed) variables. It was necessary to use (k)
to turn keyboard-checking on and off (CHK/NOCHK) because the letter (c) was
used for turning the cursor on and off (CSR ON/CSR OFF). The letters (x) and
(y) are used to move the screen cursor (x=column and y=row).
Example: .V1V2+V3-V4V5 would be equivalent to:
V1=0 \ V2=0 \ V3++ \ V4-- \ V5--
+ckt12v123 would be equivalent to:
CSR ON \ CHK \ RST T12 \ V123++
-mpst12v234 would be equivalent to:
MOUSE OFF \ P- \ RST S \ RST T12 \ V234--
.it12v123xy would be equivalent to:
INTKEYS CLEAR \ RST T12 \ V123=0 \ C@[R.],1 \ C@1,[C.]
.xy would be equivalent to:
C@1,1
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.
Useful information from the BIOS Data Area located at 0040:0000h in low memory
────────────────────────────────────┬─┬─┬─┬─┬─┬─┬─┬─┬──────────────────────────
Bit│7│6│5│4│3│2│1│0│ Meaning
────────────────────────────────────┼─┼─┼─┼─┼─┼─┼─┼─┼──────────────────────────
[BIOS23] = keyboard status byte #1 │x│ │ │ │ │ │ │ │1=insert mode active
│ │x│ │ │ │ │ │ │1=caps lock mode active
│ │ │x│ │ │ │ │ │1=num lock mode active
│ │ │ │x│ │ │ │ │1=scroll lock mode active
│ │ │ │ │x│ │ │ │1=either alt key held down
│ │ │ │ │ │x│ │ │1=either ctrl key held down
│ │ │ │ │ │ │x│ │1=left shift key held down
│ │ │ │ │ │ │ │x│1=right shift key held down
────────────────────────────────────┼─┼─┼─┼─┼─┼─┼─┼─┼──────────────────────────
[BIOS24] = keyboard status byte #2 │x│ │ │ │ │ │ │ │1=insert key held down
│ │x│ │ │ │ │ │ │1=caps lock key held down
│ │ │x│ │ │ │ │ │1=num lock key held down
│ │ │ │x│ │ │ │ │1=scroll lock key held down
│ │ │ │ │x│ │ │ │1=pause mode active
│ │ │ │ │ │x│ │ │1=SysReq key held down
│ │ │ │ │ │ │x│ │1=left alt key held down
│ │ │ │ │ │ │ │x│1=left ctrl key held down
────────────────────────────────────┼─┼─┼─┼─┼─┼─┼─┼─┼──────────────────────────
[BIOS150] = keyboard status byte #3 │x│ │ │ │ │ │ │ │read ID in progress
│ │x│ │ │ │ │ │ │last char was 1st ID char
│ │ │x│ │ │ │ │ │force num lock if ID&KBX
│ │ │ │x│ │ │ │ │101/102-key kbd installed
│ │ │ │ │x│ │ │ │1=right alt key held down
│ │ │ │ │ │x│ │ │1=right ctrl key held down
│ │ │ │ │ │ │x│ │last code was E0 hidden
│ │ │ │ │ │ │ │x│last code was E1 hidden
────────────────────────────────────┼─┼─┼─┼─┼─┼─┼─┼─┼──────────────────────────
[BIOS151] = keyboard LED flags │x│ │ │ │ │ │ │ │kbd xmit error flag
│ │x│ │ │ │ │ │ │mode indicator update
│ │ │x│ │ │ │ │ │resend receive flag
│ │ │ │x│ │ │ │ │ack rcvd
│ │ │ │ │x│ │ │ │reserved (must be 0)
│ │ │ │ │ │x│x│x│kbd LED state bits
────────────────────────────────────┴─┴─┴─┴─┴─┴─┴─┴─┴──────────────────────────
[BIOS80] = cursor column (0 to 79 instead of 1 to 80)
[BIOS81] = cursor row (0 to 24 instead of 1 to 25)
[BIOS96] = cursor type (ending scan line)
[BIOS97] = cursor type (beginning scan line)
───────────────────────────────────────────────────────────────────────────────
[BIOS108] = system timer ticks (LSB) ──┬──4-byte value
[BIOS109] = system timer ticks │
[BIOS110] = system timer ticks │
[BIOS111] = system timer ticks (MSB) ──┘
───────────────────────────────────────────────────────────────────────────────
For example, to see if either shift key is being pressed,
IF [BIOS23]&3 THEN do_something....
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 up to 25O rows.
Note that buffers 1 to 66 are contiguous in memory, and buffers 67 to 73 are
contiguous in the video adapter memory, so that buffers 66 and 67 are not
contiguous. This also means that programmers have access to certain
"undocumented" buffers outside the O to 63 range.
┌──────┬──────────────────────────────────────────────────────────┐
│buffer│ Description │
╞══════╪══════════════════════════════════════════════════════════╡
*│ 64 │ temporary - usually holds last screen loaded from a file │
├──────┼──────────────────────────────────────────────────────────┤
*│ 65 │ temporary - misc. I/O from last file load and screensaver│
├──────┼──────────────────────────────────────────────────────────┤
│ 66 │ temporary - used only by SAVE/RESTORE │
╞══════╪══════════════════════════════════════════════════════════╡
!│ 67 │ CGA,EGA,VGA video adapter page 1 (text mode) │
├──────┼──────────────────────────────────────────────────────────┤
│ 68 │ CGA,EGA,VGA video adapter page 2 (text mode) │
├──────┼──────────────────────────────────────────────────────────┤
│ 69 │ CGA,EGA,VGA video adapter page 3 (text mode) │
├──────┼──────────────────────────────────────────────────────────┤
│ 7O │ CGA,EGA,VGA video adapter page 4 (text mode) │
├──────┼──────────────────────────────────────────────────────────┤
│ 71 │ CGA,EGA,VGA video adapter page 5 (text mode) │
├──────┼──────────────────────────────────────────────────────────┤
│ 72 │ CGA,EGA,VGA video adapter page 6 (text mode) │
├──────┼──────────────────────────────────────────────────────────┤
│ 73 │ CGA,EGA,VGA video adapter page 7 (text mode) │
└──────┴──────────────────────────────────────────────────────────┘
! Note: The ShowText menu program (ST.EXE) stores a 96-byte configuration block
containing project name, path etc. in buffer 67 (row 1).
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=64) is overwritten only if a non-zero
fade is specified on the screen-file-load COPY command. The second
temporary buffer (bfr=65) is always overwritten by the command,
COPY(filename,bfr). Buffer 65 is also used as the screensaver area.
Use these extra buffer areas carefully!
SHOWTEXT Revision History:
O9/12/1995 - v 1.9
+ Added the $BUFFERS compiler directive
+ Added the feature that puts the directory of the currently running EXE
file in bfr=1 (row=4,col=1); its length is placed in the attribute
byte of the character in bfr=1 (row=5,col=1); no capitalization is done
+ Added the following system variables: [chk], [arrows], [csr] and [intk]
* Changed the program so that the DOS command line is placed in bfr=1
(row=1,col=1); its length is placed in the attribute byte of the character
in bfr=1 (row=3,col=1); no capitalization is done. This change was made to
accomodate the new $BUFFERS directive (in case only 1 buffer was used).
O8/17/1995 - v 1.8
+ Added the feature that puts the DOS command line in bfr=63 (row=1,col=1);
its length is placed in the attribute byte of the character in bfr=63
(row=3,col=1); no capitalization is done
+ Added the +/-/. shortcut command prefixes for a,c,i,k,m,p,s,t__,v___,x,y
+ Added the MOUSE ON / MOUSE OFF instructions
+ Added the XBLOAD and XBSAVE instructions
* The compiler no longer accepts the keywords (AND,OR,XOR,MOD),
use the symbols (&, @ or |, #, ~) respectively instead.
+ Added new instruction (;=force variable into range): ;min,%variable,max
+ Added new system variables: [POP], [;min:val:max],
[F:buf:row:col] and [B:buf:row:col]
+ Added new instruction: CALL subroutine(val,val,..etc..)var,var,..etc..
* Changed the PUSH to accept numeric values and all variable types,
although the POP still accepts only normal (non-indexed) variables.
(!! IMPORTANT !! note: The range on a PUSH/POP now uses (:) instead of (-)
e.g. PUSH V1,V2:V7,V8 instead of PUSH V1,V2-V7,V8 )
To recompile older programs, you -must- change the (-) to (:) manually,
because the compiler may not catch all PUSH/POP errors in older programs.
O7/1O/1995 - v 1.7
+ Added the INTKEYS ON|OFF|CLEAR command
* Increased the number of interrupt keys: (ON INTKEYn ...) n=0 to 15
+ Added the Block-MODify-attributes (BMOD) command:
BMOD bfr (r1,c1,r2,c2) and_mask , or_mask , xor_mask
(Note: The BMOD command replaces the BXOR command!)
+ Added Alt-P (Paint Mode Select) option to the drawing program (STD.EXE)
O3/2O/1995 - v 1.6
+ Added the [BIOSaddr] system variable (e.g. [BIOS23] is kbd status byte #1)
+ Added the option to use the NSTEP keyword (NegativeSTEP) in a FOR statement
+ Added the timer(ticks)-in-range? system variable [TM:lowval:timer#:highval]
* Modified the timer(ticks) system variable [Tn] to allow math
(e.g. %X=[T%i+1] )
* Modified the RST T instruction to allow math operations (e.g. RST T%i+1)
* Modified the RESTORE instruction so that it would also reset cursor limits
√ Fixed a minor bug in the FOR/NEXT instructions to properly handle
math expressions.
SHOWTEXT Revision History (continued):
O2/15/1995 - v 1.5
+ Added the GOLOOP,EXITDO,GONEXT,EXITFOR,GOWEND,EXITWHILE instructions
+ Added the DIRTOP,DIRBOT,DIRPRV,DIRNXT,DIRCMP,DIRCPY,DIRFND,DIRPRT commands
+ Added the [FB:fg:bg] and [DIR] system variables
* Modified the compiler (STC.EXE) to show status bar during compilation
+ Added the second form of the WINDOW command (i.e. with attribute value):
WINDOW (r1,c1,r2,c2)windowtype,attribute
* Modified the XFSAVE/XFLOAD commands to use .STF file type (instead of .SCN)
√ Fixed a bug in the COPY($(bfr,row,start,end),destbfr)fade command
- Removed the NAND(_), NOR(|) and XNOR(~) math operators and
changed (|) to OR (same as @) - and also changed MOD symbol from ({) to (~)
+ Added several options to the ShowText Drawing Program (STD.EXE)
O1/17/1995 - v 1.4
* Modified the SAVE/RESTORE commands to include ALL screen parameters
+ Added the [IR:lowvalue:testvalue:highvalue] system variable (in-range?)
+ Added the ability to imbed a system variable inside another system variable
+ Added the $DOS, $LIB ADD and $LIB DIR compiler directives
+ Added the P+ and P- commands
* Modified the COPY command:
It now allows COPY( $(bfr,row,startcolumn,endcolumn) , destbfr ) fade
which performs a filename table lookup
O9/28/1994 - v 1.3
* Modified the CLS command: It now places the print cursor at row=1,col=1
* Modified the EXIT command: It places the DOS cursor at the print cursor
* Modified the EXITC command: It now resets VIRTUAL mode before exiting
* Modified the ShareWare banner opening screen
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 and WHILE\WEND looping structures
+ 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.
SHOWTEXT REGISTRATION ORDER FORM
The REGISTERED version does not generate the initial UNREGISTERED banner.
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 is yours to keep. No refunds.
If the diskette is damaged in transit, you may return the diskette (at your
own expense within 2 weeks). You will receive another diskette, but no refund.
This will be done only once per registration. We apologize to the honest
users, but some dishonest users would abuse a return-for-refund policy :-(
You will be issued a unique registration code which entitles you to technical
support (up to three requests by MAIL only). This explains why the registration
fee is so low, compared to other packages costing much more.
Please consider the cost of duplication, handling, postage, TAXE$, 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 _____________________________