# MIPS Interrupts and the timer

[MIPS Documentation](https://asm-editor.specy.app/documentation/mips.md)

Web page: https://asm-editor.specy.app/documentation/mips/interrupts

Handle timer and keyboard interrupts, and step through an interrupt handler.

9 entries, each with its own page of markdown:

- [Interrupts and the timer](https://asm-editor.specy.app/documentation/mips/interrupts/interrupts-and-the-timer.md): An interrupt makes the processor run a handler between two program instructions.
- [The handler](https://asm-editor.specy.app/documentation/mips/interrupts/handler.md): The processor runs the handler and records what happened in coprocessor 0's registers (see Registers).
- [When an interrupt is taken](https://asm-editor.specy.app/documentation/mips/interrupts/enabling.md): A source that is asking sets its bit in Cause.
- [The timer](https://asm-editor.specy.app/documentation/mips/interrupts/timer.md): Count ($9) increases by one every two instructions.
- [Keyboard interrupts](https://asm-editor.specy.app/documentation/mips/interrupts/keyboard.md): Set bit 1 of receiver control to request interrupts while typed characters are waiting.
- [Exceptions](https://asm-editor.specy.app/documentation/mips/interrupts/exceptions.md): With a handler at 0x80000180, exceptions enter it instead of stopping the program.
- [Debugging a handler](https://asm-editor.specy.app/documentation/mips/interrupts/debugging.md): Step runs one instruction, and when an interrupt is waiting that instruction is the handler's first: the Step lands on 0x80000180.
- [From C](https://asm-editor.specy.app/documentation/mips/interrupts/from-c.md): provides sim_cp0_count(), sim_cp0_set_count(), sim_cp0_compare() and sim_cp0_set_compare() for the timer.
- [Compared with MARS](https://asm-editor.specy.app/documentation/mips/interrupts/compatibility.md): Count and Compare are MIPS32's: MARS 4.5 does not have them.
