1133
Clock Instructions Section 3-28
Description HMS(066) converts the 8-digit BCD seconds-only data in S and S+1 to 8-digit
BCD hours/minutes/seconds data and outputs the result to D and D+1.
Flags
Precautions The maximum value for the source data is 35,999,999 seconds (9,999 hours,
59 minutes, and 59 seconds).
Examples When CIO 000000 turns ON in the following example, the seconds data in
D00100 and D00101 (123,456 seconds) is converted to hours/minutes/sec-
onds data and the result is output to D00200 and D00201.
Indirect DM/EM
addresses in BCD
*D00000 to *D32767
*E00000 to *E32767
*En_00000 to *En_32767
(n = 0 to C)
Constants 00000000 to 35999999
(BCD)
---
Data Registers ---
Index Registers ---
Indirect addressing
using Index Registers
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Area S D
Seconds
Hours
Minutes Seconds
Name Label Operation
Error Flag ER ON if the seconds data in S and S+1 is not BCD and in the
range 0 to 35,999,999.
OFF in all other cases.
Equals Flag = ON if the content of D is 0000 after the operation.
OFF in all other cases.
S:
D:
123,456 seconds
Hours/minutes/secondsSeconds
17 minutes, 36 seconds
34 hours
→