You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Carlos e821650f8e
updated README 20
9 years ago
..
cpu Lesson 20 step 1, the timer 9 years ago
drivers lesson 20, preliminar 9 years ago
kernel Lesson 20 step 1, the timer 9 years ago
Makefile lesson 20, preliminar 9 years ago
README.md updated README 20 9 years ago
boot lesson 20, preliminar 9 years ago

README.md

Concepts you may want to Google beforehand: CPU timer, keyboard interrupts

Goal: Implement our first IRQ handlers: the CPU timer and the keyboard

Everything is now ready to test our hardware interrupts.

Timer

The timer is easy to configure. First we'll declare an init_timer() on cpu/timer.h and implement it on cpu/timer.c. It is just a matter of computing the clock frequency and sending the bytes to the appropriate ports.

We will now fix kernel/utils.c int_to_ascii() to print the numbers in the correct order. For that, we need to implement reverse() and strlen().

Finally, go back to the kernel/kernel.c and do two things. Enable interrupts again (very important!) and then initialize the timer interrupt.

Go make run and you'll see the clock ticking!