EasyManuals Logo

Radio Shack TRS-80 Model 100 User Manual

Radio Shack TRS-80 Model 100
210 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #154 background imageLoading...
Page #154 background image
"
/
1/
A
/]
-
~
(
) A
I
-
.,.
I J I
I I
)
-
~
.J..J-I
-,
..
••
-<
- -
,.
-9-
-
-
i"""""'IlI
J
r'"
,.
0
l
••
tt-
I I
I
I
,.
J
, A
I
'"
"",
.,.
The number
of
beats L is determined
by
the type
of
note:
quarter note
half note
whole note
= 1 beat
= i beats
= 4 beats
You
might like
to
experiment a little by replacing the DATA statements with your
own music. Just remember
to
terminate the music with a 0,0.
Experiment
#4
Animated Character
Adding sound
is
not the only
way
to
liven
up
a program. A display which shows
action
is
often more interesting than a static display. While there are no specific
animation statements, you can easily create movement using the PRINT@ statement.
The following program illustrates the technique.
Clear memory using the NEW command and enter:
1121
CLS
2121
FOR
1=12121
TO
158
3121
PRINT@
I,
CHR$(1l17)j
4121
FOR
J=l
TO
GI2I
:
NEXT
J
5121
NEXT
I
Execute this program and watch the stick figure race across the display. While this
program added action,
it
does not adequately simulate movement.
You
can erase the
trail behind the runner by printing a space in his previous position and simulate
movement more realistically.
Change line 30
to:
3121
PRINT@
I,
"''';
CHR$(
147);
and execute the program
to
see a more realistic simulation of movement. This
is
typical of animation on a computer display; you have
to
erase the last image and
create the new image for each frame in the sequence.
Line
10
As usual, the program begins by clearing the display.
Line
20 A FOR/NEXT loop varies the print position from 120
to
158. This
corresponds to the fourth line, from the left
to
the right borders.
148

Other manuals for Radio Shack TRS-80 Model 100

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Radio Shack TRS-80 Model 100 and is the answer not in the manual?

Radio Shack TRS-80 Model 100 Specifications

General IconGeneral
BrandRadio Shack
ModelTRS-80 Model 100
CategoryDesktop
LanguageEnglish

Related product manuals