I have some problems with the timer..
I've looked in a few sources, but they did exactly like me.
My IDT&PIC-Remap are working(i know from keyboard).
So i am wondering why it doesn't work...
-Code-
void timer_set(unsigned int frequency)
{
unsigned short foo = 1193182 / frequency;
outp(0x43, 0x36);
outp(0x40, (unsigned char) foo);
outp(0x40, (unsigned char)(foo >>
return;
}
void main()
{
...
timer_set( 100 ); //set frequency of timer 0(which is connected to IRQ 0) to 100
setVector(0x20, (void *)(tim));
...
}
asm (
".globl _tim \n"
"_tim: \n"
"cli \n"
"pusha \n"
"pushf \n"
"call _timer \n"
"popf \n"
"popa \n"
"sti \n"
"iret \n"
);
void timer()
{
outp(0x20,0x20);
k_printf("timer\n");
counter++;
return;
}
-Code-
I would be glad toget it working, because without it'd be difficult to make a multi-tasking somehow.