1.2 KiB
1.2 KiB
0 => InvalidInterrupt – CPU exception for an invalid interrupt request
1 => PageFault – CPU exception triggered by an illegal memory access
2 => ProtectionFault – CPU exception for a protection violation (e.g., privilege level)
3 => InvalidOpcode – CPU exception for executing an undefined opcode
4 => DivideByZero – CPU exception when dividing by zero
5 => StackOverflow – CPU exception due to stack overflow
6 => WriteToReadOnly – CPU exception for writing to a read‑only segment
7 => ReadFromWriteOnly – CPU exception for reading from a write‑only segment
8 => UnmappedIo – CPU exception for accessing unmapped I/O
Reserved Range (9–31): Future CPU exceptions
IRQ Range (32–63)
- Hardware – Represents hardware interrupt requests.
32 => SerialIn – Interrupt triggered by serial input
Syscall Range (64–255)
- Software(u8) – Represents system calls.
The enum is aliased to start at value 128, so valid syscall numbers are 128‑255.
Programs typically use the range 64–127 for OS‑defined syscalls, while values ≥128 are reserved for software interrupts.