#include "interrupt.h" #include "port.h" #include "bees.h" #include "keyboard.h" #include uint8_t ps2_read() { const struct port ps2_port = {0x60, port8bit}; return port_read(ps2_port); } #define IRQH(I) void irqh_ ## I () #define EXCH(I) void exch_ ## I () IRQH(0x00) {return;} IRQH(0x01) {keyboard_event(&ps2_read);} EXCH(0x00) {bees("division by zero");} EXCH(0x01) {bees("values of beta may give rise to dom!");} EXCH(0x02) {bees("lp0 on fire");} EXCH(0x03) {bees("values of beta may give rise to dom!");} EXCH(0x06) {bees("invalid opcode (bad!)");} EXCH(0x07) {bees("values of beta may give rise to dom!");} EXCH(0x08) {bees("double fault");} EXCH(0x0D) {bees("general protection fault");}