EasyManua.ls Logo

Texas Instruments TI-99/4A - CHAPTER 5 SOFTWARE

Texas Instruments TI-99/4A
204 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
Loading...
Bouncing
Ball
If
the
new
ball position is still on
the
screen,
then
the
screen
is
cleared
to
erase
the
old
ball
location
Thp
h;:;
11
i<.;
thpn
r1ic::pIRy~r1
M
the
new
location designated
by
Y
and
X.
These
statements
change
the direction
of
the ball if X is out of
range.
The
CALL
SOUND
statement
produces
the
"bouncing"
tone. Lines
330
and
340
check
to
see if Y
is
also
out
of range.
If
it
is, the
pro~am
transfers
to
change
the Y direction.
If
not.
the
program
transfer's
to
line
220
to
compute
a
new
ball
position.
These
statements
change
the direction of
the
ball
ifY
is
out
of
range.
The
CALL
SOUND
statement
produces
the
"bouncing"
tone.
The
program
then transfers to line
220
to
compute
the new
ball position.
User's Reference
Guide
Examples:
>280
CALL
CLEAR
>290
CALL
HCHAR(Y,X,96)
>300
GOTO
220
>310 XDIR=-XDIR
>320
CALL
SOUND(30,380,2)
>330
If
Y<1
THEN
360
>340
IF Y>24
THEN
360
>350
GOlO
220
>360
YDIR=-YDIR
>370
CALL
SOUND(30,380,2)
>3.'!0
GDTO
220
>RUN
--screen
cLears
BALL
COLOR?
5
SCREEN
COLOR?
15
--baLL
appears
in
center
of
screen
and
begins
bouncing
(press
CLEAR
to
stop
the
program)
I11-21

Other manuals for Texas Instruments TI-99/4A

Related product manuals