Cls; For M=0 To; Set (M,0); Set <M,47) - Radio Shack TRS-80 User Manual

Micro computer system
Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

get carried
away
with
this
program,
you
will
want
to calibrate
it
with
a precision-type
timepiece
(increasing
or decreasing the
"500"
figure as
needed).
Over
the
short run,
this
is
quite a
good
timer.
Note
that
we
are
not
triggering this
with the
60 Hz
line
frequency, but
relying solely
on
the
amount
of
time
required
to
execute
FOR-NEXT
loops.
Oh, Yes
.
.
.
The
PRINT
AT
.
.
.
Anyway
let's
not
lose sight
of the
forest for
the
trees (or
something
equally
trite).
The
purpose of
this
little
program
is
to
demonstrate
the
PRINT
AT
statement.
We
used
it
twice.
By
carefully squinting
at
the
layout chart
you
can
find address
#407,
with
#470
right
below
it.
With
blazing speed, the
HMS
(no,
no,
not
Her
Majesty's Service
it
stands
for
Hours, Minutes and Seconds),
are
printed
and
the
HM&S
updated each
second.
For
the
real
clock nut,
see Part
C
for
an
operational clock
program.
It
only needs
your
closer calibration to
be an acceptable
sundial.
Most
expensive clock
in
the house!
That's
How
the
Ball
Bounces
Meanwhile, back
with the bouncing
ball.
Let's
reload
the
program from
the
first
graphics
chapter.
It
reads:
10
CLS
20
FOR M=0 TO
127
30
SET (M,0)
40
SET (M,47)
50
NEXT
M
60
V
= 14
70
D
=
1
80
RESET <64,Y+48-D)
90 SET
(64,
Y)
100
Y
=
Y+D
110
IF
Y=48
THEN
130
NOTE:
No
carriage-return-suppressing
semicolons
follow the
PRINT
AT
statements
-
sloe*
itoy
are
not
on
the
bottom
print
line
:;'"
?
;V:":."
><-<}\]::,-^Z:-.'\
'.'
135

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents