1 // 16bit code to handle system clocks.
3 // Copyright (C) 2008 Kevin O'Connor <kevin@koconnor.net>
4 // Copyright (C) 2002 MandrakeSoft S.A.
6 // This file may be distributed under the terms of the GNU GPLv3 license.
8 #include "biosvar.h" // struct bregs
9 #include "util.h" // debug_enter
10 #include "disk.h" // floppy_tick
12 // INT 1Ah Time-of-day Service Entry Point
14 handle_1a(struct bregs *regs)
22 handle_1c(struct bregs *regs)
27 // INT 08h System Timer ISR Entry Point
29 handle_08(struct bregs *regs)
35 u32 counter = GET_BDA(timer_counter);
37 // compare to one days worth of timer ticks at 18.2 hz
38 if (counter >= 0x001800B0) {
39 // there has been a midnight rollover at this point
41 SET_BDA(timer_rollover, GET_BDA(timer_rollover) + 1);
44 SET_BDA(timer_counter, counter);
49 // int70h: IRQ8 - CMOS RTC
51 handle_70(struct bregs *regs)