woodys1
Lifetime Supporting Member
I need help in setting up a 12hr clock on a slc500. Any help would be greatly appreciated.
The hours should be consistent with a real clock in that they go from 1-12.
...
The actual Hours value is in the Status register S:40 and goes from 0 to 23. Since you know the hours 0 through 11 are AM and the hours 12 through 23 are PM, you can use a Limit (LIM) instruction or a pair of Greater Than or Equal To (GEQ) and Less Than or Equal To (LEQ) instructions to set the "PM" indicator.
woodys1 said:Input Pressed Display
1:1/07 Hours
1:1/10 Minutes
Both or neither Seconds
of the above
1) You need to get a copy of the clock hours (S:40), and when GRT-er than 12, SUB-tract 12.