I am wondering if it would be easier to keep only a TotalElapsedSeconds count and calculate HRS, MNS, and SDS as needed? I admit that I have not tried this, but it seems feasible. A word variable easily holds 13 hours (in seconds) and AM/PM or 24 hour clock flag provides convenient flags to indicate the 12 hour adjustment needed to avoid rollover (subtract 43200 at 46800). so:

Just a little while after midnight (when the counter and flag resets to zero), TotalElapsedSeconds might be, say... 1146. In that case,

HRS= 1146/ 3600 = 0
MNS= 1146 - (HRS * 3600) / 60 = 19
SCS= 1146- (HRS * 3600) - (MN * 60) = 06 - the time 00:19:06, is correct.

Closer to noon, the total might be 43321.
HRS= (43321/ 3600) = 12
MNS= 43321- (HRS * 3600) / 60 = 02
SCS= 43321- (HRS * 3600) - (MN * 60) = 01 - the time 12:02:01, is correct.

At 1:00, the timer would be 46800 and subtracting 12 hours (43200 seconds) leaves TotalElapsedSeconds = 3600, or exactly 1:00:00 (or by adding 12, 13:00 in 24H mode). The caveat here is that the midnight adjustment and the 1:PM adjustment are not symmetric at 12 hours each - something of a kludge or, perhaps the time as 24:00:01 is of no issue to you? If not, then the time may rollover to 1:00:00 in even 12 hour cycles.

To set the time, adding or subtracting 3600 adjusts the time by an hour, similarly adding or subtracting 60 changes the time a minute.

I have considered this approach as a means of simplifying clock adjustments - say a user wants to subtract 10 minutes at only 5 minutes past the hour - in this way (I think) it may be simpler than fiddling with decrementing the hour separately.