EasyManua.ls Logo

Commodore PET - Setting the Clock

Commodore PET
447 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...
SETTING THE CLOCK
Another PET feature
is
the real-time clock. The
PET
clock keeps real
time
in
a 24-hour cycle
by
hours,
minutes,
and
seconds. The reserved string
variable TIME$ or TI$ keeps track of the time.
To set the clock, use the following
format:
TIME$ = "hhmmss"
where:
hh
is
the hour between 0 and 23.
mm
is
the minutes between 0 and 59.
55
i5
the seconds between 0 and 59.
For
hh,
enter the hour of the day from 00
(12
am)
to 23
(11
PM).
The
PET
is
on
a
24-hour cycle
so
that you can distinguish between
AM
and
PM,
unlike 12-hour
clocks. The hours from 00 to
11
designate AM, and the hours from 12 to 23 desig-
nate
PM,
returning to 00 at midnight.
At
midnight. when one 24-hour cycle ends
and another begins,
hh,
mm, and
ss
are ail equal to
zero.
When
initializing TIME$ to the actual time. type in a time a few seconds in
the future.
When
that actual time
is
reached, press
RETURN
and the
PET
clock
is
set.
TIME$="
120150<CR>
To retrieve the time any time after the initialization of
TIME$,
type the
following
in calculator or program mode:
?TIME$
<CR>
and the
PET
will
display the time in hhmmss:
?TH1E$
121::12131::1
The PET clock keeps time until the
PET
is
turned off. The clock needs to
be reset when the PET
is
powered
up
aga
in.
281

Table of Contents

Related product manuals