Nothing. :/ 0000000Ch4ozz wrote:Your unmasking for all interrupts looks wrong to me:Change it to:Code: Select all
outportb(0x21, 0x0); outportb(0xA1, 0x0);
Code: Select all
outportb(0x20, 0x0); outportb(0xA0, 0x0);
Also I've followed one timer related tutorial.
And I get this "not passed" message.
Code: Select all
int timer_ticks = 0;
void timer_phase(int hz)
{
int divisor = 1193180 / hz; /* Calculate our divisor */
outportb(0x43, 0x36); /* Set our command byte 0x36 */
outportb(0x40, divisor & 0xFF); /* Set low byte of divisor */
outportb(0x40, divisor >> 8); /* Set high byte of divisor */
}
void timer_handler(struct regs *r)
{
timer_ticks++;
/* Every 18 clocks (approximately 1 second), we will
* display a message on the screen */
if (timer_ticks % 18 == 0) {
writeOutput("One second has passed");
} else {
writeOutput("not passed...");
}
}
void timer_install()
{
irq_install_handler(0, timer_handler);
}
void timer_wait(int ticks)
{
unsigned long eticks;
eticks = timer_ticks + ticks;
while(timer_ticks < eticks);
}
IDT output from Bochs:
Interrupt Descriptor Table (base=0x0000000000000000, limit=0):
Error I am getting:
(0).[259291843] [0x0000000000115148] 0008:0000000000115148 (unk. ctxt): mov dword ptr ss:[esp], 0x00114c30 ; c70424304c1100