Skip to content

Instantly share code, notes, and snippets.

View lolguy91's full-sized avatar
🥜
Deez Nutz

lolguy91

🥜
Deez Nutz
View GitHub Profile
@FedorLap2006
FedorLap2006 / pic.c
Last active August 27, 2023 04:18
x86 customizable PIC handler
#include "pic.h" // Replace with an actual header
#define PIC_PRIMARY_CMD_PORT 0x20
#define PIC_SECONDARY_CMD_PORT 0x20
#define PIC_PRIMARY_DATA_PORT 0x21
#define PIC_SECONDARY_DATA_PORT 0xA1
static void pic_iowait() { __asm__ volatile("outb %%al, $0x80" : : "a"(0)); }
struct pic_config current_pic_config;