woodelf wrote:
PS. I hindsite why did they not have the time of day
clock set to some
rational freq like 30 HZ?
The interrupt rate was set in the BIOS, probably before PC-DOS was even
envisioned. So why 55 msec? Easy--
The clock frequency is derived from the 4.77 MHz system clock and is
1.19318 MHz, derived from the 4.77 MHz processor clock. The largest
interrupt interval allowed by the 8253 CTC is 65536 counts, which gives you
18.2 times per second.
This was a wise move--handling a periodic interrupt to keep the clock
updated (and also to figure out when to turn diskette drive motors off) is
expensive on slower processors. And, the faster the clock, the tighter the
constraints on OS code to not disable interrupts for excessive periods.
Given the speed of the original 5150, a 55 msec timer interval was pretty
reasonable.
Coicidentally, there are quite nearly 2**16 of these interrupts in an hour.
It's instructive to compare the original 5150 BIOS code listing with the
dreck present in MS-DOS. The BIOS is carefully documented, and enjoys a
certain amount of convention. So, if you're within a procedure at label
C12, you know that label C13 will probably be the next label in the
listing. The BIOS was probably written by a mainframe programmer who had
learned to deal with design review meetings, large multi-coder projects and
code review.
As a curious aside, the trimmer near the 14 MHz crystal on the 5150 is
intended not to adjust the time-of-day clock accuracy, but rather to adjust
color rendition with the CGA card.
Cheers,
Chuck