REAL TIME CLOCK ROUTINE by Don Retzlaff Your Bigboard computer is ready to keep real time if you purchased the clock option. Thanks to Russell Smith who wrote the guts of this Real Time Clock and Display routine, we have an excellent asset for your Bigboard. The principle features of this routine are: 1. Keeps time in Years, Months, Days, Hours, Minutes, and Seconds. 2. Displays Hours, Minutes, and Seconds in the upper right hand corner of the screen. 3. Clock can be read from high level languages. 4. Clock can be set from high level languages or with the following SETCLK routine. The Clock routine starts with a move-up routine (described in another issue of Micro C.) to put the routine in the desired location in upper memory. After you get it running you may want to change the origin, to pack your high memory routines. Next the interrupt vector is setup to the clock routine. The interrupts are enabled and control is returned to CP/M. Each time the clock ticks (every second) the clock increments the seconds counter. After 60 seconds the minutes are incremented and the seconds set to zero. This process is repeated for Hours, Days, Months, and Years. Our timer does not compensate for Leap Year, to conserve memory. When each second is updated the time is displayed in the upper right corner of the screen. NOTE: I have renamed locations FF5FH and FF61H from the names shown in your PFM-80 manual. This was done to put all time values in natural order, to save memory. You will also note that when the day is updated, I had to do some fancy footwork to keep up with the varying length of the months. To make the counter work it is necessary to jumper the timer plug JB2 (3-4 and 7-8). This strapping is also correct for the Disk-AC time out function. Don't forget that after you assemble the program you have to load the HEX file with DDT, move it to 0100H, then save it with the SAVE program as a COM file. On my two Bigboards I notice that the clock keeps time very well on one (+- 2 seconds per day). The other gains about 40 seconds every 24 hours. This can be corrected by replacing C106 with a variable capacitor 20-75 pf. Set the frequency with a frequency counter. (I haven't tried this yet, but it should work - If you try it, let me know how bad I blew it.)