summaryrefslogtreecommitdiff
path: root/kernel/hal/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/hal/timer.c')
-rw-r--r--kernel/hal/timer.c43
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) = ' ';
+ }
+}
+