As mentioned earlier, here is a link to the finished code, which should give people an example of how to use real time interrupts on the M68H912B32EVB. This evaluation board comes with a M68HC912B32 processor (as the name indicates, haha!).
The attached program does the following (in a nutshell).
It sets the RTI control register (RTICTL) to enable real-time interrupts. The interrupt divider chain is set up in such a way that interrupts occur every 32.768 ms. When the interrupt occurs, I count up the variable TIMECOUNT. When this variable reaches $727 (hex), approximately 1 minute has passed. I then update the variable MINUTE using the CLK_UPDATE label. Once MINUTE reaches 10, I re-initialize it to 0 using the CLK_RESET label.
In the main program, I check if MINUTE is 2, to toggle PORT A on. I am having 1 LED on PORT A to check this, but a voltmeter works as well. I then keep checking MINUTE until it is equal to 6, and I once again toggle PORT A -- this time off. This is always done using the lable TOGGLE.
You can modify this code to suit your RTI needs. I am using this setup, because I simulate the passing of a whole day over 10 minutes. After 2 minutes I start a process, while after 6 I quit the process. Once MINUTE is reset to 0, this restarts.
As far as accuracy is concerned, I did calculations on it and the clock loses about 14 minutes and 20 seconds every year. This accuracy is more than enough for me, but if you need a super accurate clock, you must compensate for this loss (perhaps every day).
Anyway, the code should be well commented, but let me know if you have questions.
The code can be found at:
http://home.comcast.net/~cwinter/RTI_Test.asm