148
The
VIC 20
User
Guide
and TI; they are numbers representing real time, calculated from jiffy time
(TIME, TI). The conversion
is
done as follows: Each second
is
divided into
60
jiffies. One minute
is
composed of
60
seconds. One
hour
is
made up of
60
minutes. Thus, one second
is
60
jiffies, one minute
is
3600 jiffies, and one
hour
is
216,000 jiffies, as illustrated.
Jiffy
Minute
= 1
~
Second/60 = Jiffy
=
60
X Jiffy
=
60
Jiffies
~
60
X S""ond
~
L-
___
~_~~_O_~_}_~f_~i_~_~ff_ie_S_)
--.JI-
Minu~o
= Second /60 = Jiffy
Hour
=
60
X Minute
~
=
60
X (3600 Jiffies)
I-
Hour/60
= Minute/60 = Second/60 = Jiffy
= 216,000 Jiffies
The following program converts jiffy time (J) into real time, shown as
hours (H), minutes (M), and seconds (S). A complete program follows the
statement descriptions.
19
J=TI Calculate hours. Integer function
20
H=INT(J/216000) takes only whole number.
39
IF
H00
THEN
J=J-H*216009
If
any hours, subtract number
of
jiffies in one hour by H to leave
remaining jiffies.
40
M=
I
NT<
.TI3600) Calculate minutes.
Integer function takes only whole
number.
50 IF
MOe
THEN
J=J-M!lE3600
If
any minutes, subtract number
of
jiffies in minutes by 7 to leave
remaining jiffies.
60
S=INT<J/6fl) Calculate seconds. Integer function
takes only whole number.