10 / Real-
Time
Clock
The Model III contains a real-time clock.
It
is always running, except during
cassette and disk
I/O and during certain otheroperations.
The clock keeps the following information in memory:
Abbrev.
Range
of
Values
Memory Location
MO
DA
YR
HR
MN
SS
Month
Day
Year
Hour
Min.
Sec.
01
- 12
01
-
31
00 - 99
00 - 23
00 - 59
00 - 59
16924
16923
16922
16921
16920
16919
The clock includes the logic for 28,
30
and 31-day months.
It
does not recognize leap
years.
Whenyou start the Computer, the clockis setto all zeroes:
00/00/00 00:00:00
To
Set
the
Clock
Simply store the appropriate datain the memory addresses given above. You may
do this
by
running the following program:
10
DEFINT
A·
....
Z
20
DIM
TM(S)
:30
CL.
:::::
1692
L
t
40
PRINT "INPUT 6
VALUES:
MO,
DA,
YR,
HR,
MN,
5S"
~50
INPUT
TM
(0 )
'J
TM
( 1 )
'J
TM
C~~)
'J
"1"1'1
<:3
),
TM
(4
),
TM
C5
)
60
FOR
I = 0
TO
S
70
POKE
CL
- I'J TM(I)
80
NEX'r
I
90
PRINT
"CLOCK
IS
SET"
1(;,10
END
10/1