![QSI QTERM-R55 User Manual Download Page 42](http://html1.mh-extra.com/html/qsi/qterm-r55/qterm-r55_user-manual_3304037042.webp)
32
QTERM-R55 User's Manual
QSI Corporation Fax 801-466-8792 Web www.qsicorp.com Phone 801-466-8770
D.4
Advanced Features
D.4.1
Port State
This Button indicates whether the serial port on the PC is
open or closed. If the button is red, the port is closed. The
button is green when the port is open. Other programs will
not be able to access the serial port while R55 Downloader
has it open. Normally the R55 Downloader opens the port
automatically whenever it tries to send data to the serial
port and closes the port whenever any communication
parameters are changed. The port state may be toggled by
pressing the button in the Port State box.
D.4.2
Send to R55
Enter text in this box and press the Transmit button. This
feature is useful for sending short strings to the QTERM-
R55 to test application programs.
D.4.3
Clear Box
Pressing this button erases the contents of the Download
Results box.
D.4.4
Preprocessor Settings
The R55 Downloader contains a preprocessor for qaBASIC
[see Preprocessor Directives (section D.5)]. The settings of
this preprocessor can be changed with the Preprocessor Set-
tings button. Pressing this button will bring up a dialog box
listing the various options. Select "Preprocess application
files before downloading" to control whether the preproces-
sor runs on an application file.
When the preprocessor runs, it parses all of the input files
and generates an intermediate file; this intermediate file is
then downloaded to the QTERM-R55. It is often useful to
examine the contents of this intermediate file if the terminal
reports that an application has errors. By default the inter-
mediate file is R55.tmp.qbs and is stored in the directory
which contains the application file. To change this, simply
enter a new name in the "Save intermediate file as:" box, or
browse using the ... button. To automatically delete the
intermediate file when the R55 Downloader is closed,
select "Delete intermediate file on exit." (Note: If you use
more than one different intermediate file in one session,
only the last file is deleted when the R55 Downloader is
closed).
D.5
Preprocessor Directives
D.5.1
Overview
The R55 supports a few simple preprocessor directives.
These directives are useful shortcuts to help speed applica-
tion development. Each preprocessor directive is preceded
with the '%' (percent) symbol. Each directive should be the
last command on a line (i.e. don't try to use ':' to add more
commands after the directive as they will be interpreted as
part of the directive).
D.5.2
Include
Use the include directive to include the contents of another
file at that location of the current file. The syntax is as fol-
lows:
%include "filename"
Example:
' Setup the custom keypad
%include "KeypadLayout.qbh"
In this example the contents of "KeypadLayout.qbh" are
copied into the application file.
D.5.3
Define
The define directive is a macro substitution directive that
redefines a symbol as something else. A symbol can be any
string of characters. Symbols within quoted strings are not
substituted. The syntax is:
%define <symbol> <definition>
Example:
' Shortcut to print out the serial port
%define PC1 print #COM1
The directive in this example will cause every occurrence
of PC1 (except within quoted strings) to be replaced with
"print #COM1"