The Integral Real-Time Clock
Make certain you are aware of the following points when you make inputs into the clock data area.
•
Entries into the clock data area must be in BCD code.
•
The clock runs either in the 12-hour mode or the 24-hour mode depending on how you set bit 1
in the status word. See section 12-5 for additional information.
•
The AM/PM flag (0 = AM, 1 = PM) is significant only for the 12-hour mode of the hardware
clock. The AM/PM flag corresponds to bit 7 in words 2, 6, 10, and 20.
-
In the 12-hour mode, you have to set the hours and the AM/PM flag for both the clock and
prompt functions.
-
In the 24-hour mode, if you set an AM/PM flag when you enter the values for the clock and
prompting time, then the program sets the relevant error bit.
•
The clock settings you enter must be within the range defined in Table 12-4.
Variable
Permissible Parameters
Seconds
0 to 59
Minutes
0 to 59
Hours
In the 24-hour mode:
0 to 23
In the 12-hour mode:
for AM: 1 to12
(12 = 12 o'clock noon)
for PM: 81 to 92
(81 = 1 o'clock PM)
0 to 999999 when
entering the operating
hours
Weekday
1 to 7
1=Sunday
2=Monday
3=Tuesday
4=Wednesday
5=Thursday
6=Friday
7=Saturday
12-10
Table 12-4. Range Definitions for Clock Data
Variable
Permissible Parameters
Day
1 to 31
Month
1 to 12
Year
0 to 99
Leap Year
0 to 3
0 = Leap year is current
year
1 = Leap year was last year
2 = Leap year was two
years ago
3 = Leap year was three
years ago
S5-100U
EWA 4NEB 812 6120-02