发布于 2003-06-13 10:05:57
0楼
he Read Real-Time Clock (TODR) instruction reads the current time and date from the hardware clock and loads it in an 8-byte Time buffer starting at address T.The Set Real-Time Clock (TODW) instruction writes the current time and date to the hardware clock beginning at the 8-byte Time buffer address specified by T.TODR: Error Conditions that Set ENO = 0:
0006 Indirect address
000C Clock cartridge not present TODW: Error Conditions that Set ENO = 0:
0006 Indirect address
0007 TOD data error
000C Clock not present
You must code all date and time values in BCD format (for example, 16#02 for the year 2002). See the Table below.
Format of the 8-byte Time Buffer (T)
T T+1 T+2 T+3 T+4 T+5 T+6 T+7
Year Month Day Hours Minutes Seconds 0 Day ofWeek
00 to99 01 to 12 01 to 31 00 to 23 00 to 59 00 to 59 0 to 7*
* T+7 1=Sunday, 7=Saturday
0=Disable the day of week
The time-of-day clock initializes the following date and time after extended power outages or memory has been lost:
Date: 01-Jan-90
Time: 00:00:00
Day of Week: Sunday