damn RTC(8253), initialize timer0 goes wrong, always
Posted: Mon Jan 31, 2005 12:26 pm
damn RTC(8253), initialize timer0 goes wrong, always.
after setup idt, timer0's ISR seem's work, but the simply ISR:
;------------------------------------------------
void vDoTimeIRQ(void)
{
gulTickers ++;
if ( !(gulTickers % 100) ){
kprintf("From start up, This is %d seconds\n", gulTickers/100);
}
}
;-----------------------------------------------
I'd better show my initial code for timer0:
//////////////////////////////////////////////////////
movl $52, %eax
movl $67, %edx
outb %al, %dx
jmp 1f
1: jmp 1f
1:
movl $64, %edx
movl $155, %eax
outb %al, %dx
jmp 1f
1: jmp 1f
1:
movl $46, %eax
outb %al, %dx
jmp 1f
1: jmp 1f
/////////////////////////////////////////////////
it's part of code after compile by djgcc, oringnal C code is just some outport function call.
jizz, shall i give a snapshot? shame on me
BTW, all under bochs
after setup idt, timer0's ISR seem's work, but the simply ISR:
;------------------------------------------------
void vDoTimeIRQ(void)
{
gulTickers ++;
if ( !(gulTickers % 100) ){
kprintf("From start up, This is %d seconds\n", gulTickers/100);
}
}
;-----------------------------------------------
I'd better show my initial code for timer0:
//////////////////////////////////////////////////////
movl $52, %eax
movl $67, %edx
outb %al, %dx
jmp 1f
1: jmp 1f
1:
movl $64, %edx
movl $155, %eax
outb %al, %dx
jmp 1f
1: jmp 1f
1:
movl $46, %eax
outb %al, %dx
jmp 1f
1: jmp 1f
/////////////////////////////////////////////////
it's part of code after compile by djgcc, oringnal C code is just some outport function call.
jizz, shall i give a snapshot? shame on me
BTW, all under bochs