feat: ensemble de fonctions permettant la gestion du timer

This commit is contained in:
Nicolas Hordé 2007-04-02 13:41:56 +00:00
parent 6e9f38535e
commit 1e579f83be
1 changed files with 22 additions and 0 deletions

22
lib/timer.c Normal file
View File

@ -0,0 +1,22 @@
#include "idt.h"
#include "types.h"
#include "asm.h"
#include "memory.h"
#include "timer.h"
#include "vga.h"
static u8 curs[4]={"-\\|/"};
static u8 curspos=0;
void timer()
{
cli();
showchar(0,0,curs[curspos],7);
curspos=(curspos+1)&0x3;
irqendmaster();
sti();
asm("addl $0x1C,%esp;iret;");
}