summaryrefslogtreecommitdiff
path: root/kernel/hal/timer.c
blob: 3c8269153bdf56117a9c5b7f09c94c59f0b14108 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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) = ' ';
    }
}