![QSI QTERM-R55 User Manual Download Page 25](http://html1.mh-extra.com/html/qsi/qterm-r55/qterm-r55_user-manual_3304037025.webp)
QTERM-R55 User's Manual
15
QSI Corporation Fax 801-466-8792 Web www.qsicorp.com Phone 801-466-8770
Key release events can be enabled with the
keyrelease
on
command. The
keyrelease off
command disables
them. The default is disabled.
2.8.13
Shift State
The state of the shift key (on or off) may be altered with the
shiftstate
commands:
shiftstate on
shiftstate off
The shift state is toggled automatically when the shift key is
pressed (See Figure 2-1). When the shift state is on, the
shifted key definition is used to determine the key input
(seeDefining the Keyboard (section 2.8.12).
2.9
Printing and Controlling the Screen
2.9.1
Printing Output
Printing output at specific locations is helpful for interac-
tive programs.
Example 11:
clear screen
print at(4,0) "1 -- Setup"
print at(4,1) "2 -- Save"
print at(4,2) "3 -- Quit"
input at(0,3) "Your choice: " a$
This program produces a screen resembling the following
layout:
1 -- Setup
2 -- Save
3 -- Quit
Your choice:
The
clear screen
command erases the screen.
The
at()
clause in print or input statements allows you to
move to any location (specified by the two arguments of the
at()
clause) on your screen. This is illustrated by Exam-
ple 8. Note that
at()
can be written as
@()
also, and that
the row and column addresses are zero-based (i.e. the first
row is row 0, etc.).
2.9.2
Autowrap and Autoscroll
autowrap
and
autoscroll
are screen display com-
mands that allow the qaBASIC program to control how the
display responds when printing and reaching the end of a
line or the bottom of the screen. If the autowrap is on when
the cursor reaches the end of the screen, then the cursor will
be placed at the beginning of the next line (unless the line is
the bottom line and autoscroll is off, in which case the cur-
sor will be placed at the beginning of the bottom line). If
autoscroll is on when the cursor reaches the bottom line of
the display and receives a newline character, it will scroll
the screen up (leaving the cursor in the same horizontal
position).
The following syntax is used for autowrap and autoscroll
statements.
autowrap on
autowrap off
autoscroll on
autoscroll off
2.10
Nonvolatile Storage of Data
The following commands were added to allow for a limited
“file system.” Although one may read and append, a file
can’t be overwritten because of the nature of flash memory.
The entire file space must be erased in order to rewrite a
file. The command to erase is given as a system command
(described below). Up to nine files may be used for storage
of data.
open #<1-9> [, “r” or “a”]
opens a file for read-
ing (“r”) or appending (“a” -- append is default). Example:
open #1, “r”
1,1
2,1
3,1
4,1
5,1
1
2
3
Columns
Rows
4
5
1,2
2,2
3,2
4,2
5,2
1,3
2,3
3,3
4,3
5,3
1,4
2,4
3,4
4,4
5,4
1,5
2,5
3,5
4,5
5,5
1,6
2,6
3,6
4,6
5,6
1,7
2,7
3,7
4,7
5,7
1,8
1
2
3
4
5
6
7
8
2,8
3,8
4,8
5,8
Figure 2-2. Key Locations