diff options
| author | Scott Gasch <[email protected]> | 2016-06-01 19:37:09 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2016-06-01 19:37:09 -0700 |
| commit | 0a41dae5f406d498b5c9ab1542cb5660e0d982f6 (patch) | |
| tree | 67ade9fe31cfd0458cc485e95550f7aaf14abdd1 /kernel/hal/timer.c | |
Diffstat (limited to 'kernel/hal/timer.c')
| -rw-r--r-- | kernel/hal/timer.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/kernel/hal/timer.c b/kernel/hal/timer.c new file mode 100644 index 0000000..3c82691 --- /dev/null +++ b/kernel/hal/timer.c @@ -0,0 +1,43 @@ +//+---------------------------------------------------------------------------- +// +// File: timer.c +// +// Module: +// +// Synopsis: +// +// Created: sgasch 21 Oct 2003 +// +//+---------------------------------------------------------------------------- + +#include "kernel.h" +#include "hal.h" +#include "rtl.h" +#include "interrupts.h" + +void +HalTimerInt(INTERRUPT_STATE *is) +{ + static CHAR whee[] = "|/-\\\0"; + static ULONG u = 0; + static BYTE b = 0; + static unsigned int foo; + BYTE *p = (BYTE *)0x000B8000; + + out(0x61, 0x80); + u++; + + CURRENT_STAMP(&foo); + + if ((u % 500) == 0) + { + b++; + if (whee[b] == '\0') + { + b = 0; + } + *(p + 158) = whee[b]; + *(p + 159) = ' '; + } +} + |
