EasyManua.ls Logo

Radio Shack TRS-80 X-PAD GT-116 - Page 41

Radio Shack TRS-80 X-PAD GT-116
65 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
character
at
a
time
when
the
Pen is
pressed
down
on
theMenu:
260
IF PEEK
(
65376 )
=3
THEN
260
Line
270
sends
the program in
a
loop: 270 GOTO 20
The
Menu
Is
In
Your Court
You can
easily alter
this
Menu program
by
simply
changing
the menu
characters. Enter
these
lines
in the
program:
110
PRINT
"A"
i:G0T0
260
120
PRINT
"B"
i:G0T0
2G0
130
PRINT
"C"
!
:G0T0 2G0
140 PRINT
"D"
! :G0T0
2G0
150
PRINT
II
C
II
f :G0T0 260
1G0 PRINT
M
p
n
i:G0T0
260
170
PRINT
"G" i:G0T0 260
180 PRINT
"H"
i :G0T0
260
190
PRINT
II
T
II
!
:G0T0 2G0
200 PRINT
"J" :G0T0 260
210
PRINT
"K"
i:G0T0
260
You
can
vary
the
size
of
each
row
and column
in
your
Menu
by varying
the row/column
statement
in
your
program. For example: R= INT ( Y/50
)
+
1
:C=INT
(X/50)+l
Here each
Menu character is 50
increments wide and 50
increments
long. R=
I
NT < Y / 1
5
>
+
1 :
C=
I
NT <
X/20
>
+
1
This
statement sets
each
Menu
character at
20
increments
wide
(X) and
15 increments long
(Y).
R=INT<Y/Z5>+1
:C=INT(X/30)+l
In this statement, each
Menu
character is 30
increments
wide and 25
increments
long.
Go
ahead and
write your own
Menu
program.
Chapter
10
Checkpoint
1. (True/False)
Menu
sets up
a
special pre-defined area to
which
you
can assign
values.
2.
(True/False)
A
Menu can only
be
located in
the margin
area.
3.
(True/False)
Each
time you write
a
Menu
program, you
must
decide the
size of the
Menu
character.
4.
The
values
for
each
Menu
character
are
chosen:
a.
by
the Computer.
b. by
you
in
your program.
c.
randomly
in memory.
d.
bytheX-Pad.
34