how to trace the register values in a program using keil debug session
logic for storing the clock timings(eg., 12.00 o'clock) in memory