Master the fundamental concepts of device drivers & interrupts through this focused micro-challenge.
Hardware interrupts arrive as IRQ lines mapped through the PIC or IOAPIC into IDT vectors. A timer ISR typically increments a tick counter and sends an EOI byte 0x20 to the master PIC at port 0x20. For example, IRQ0 remapped to vector 0x20 fires ~18.2 Hz on the legacy PIT.
nasmLoading…
ACPI systems may route IRQs through IOAPIC entries not covered by the classic 8259 sequence. The EOI pattern you learn on the PIC still illustrates the contract: acknowledge the controller so another edge can arrive. Use a volatile tick variable if C code reads it from the main loop while the ISR writes it. Mask IRQs during table edits to avoid executing half-installed handlers.
You will install a timer or keyboard ISR that updates a counter and acknowledges the PIC. This exercise requires IDT setup, EOI discipline, and IRET without leaving interrupts masked permanently.
Implement a simple interrupt handler for timer or keyboard.
Requirements:
Three hints are available for this task, revealed one at a time inside the code workspace so you can struggle productively before seeing them.
All starter code and reference implementations are available for your local setup.
View on Github