Re-enabled interrupts from keyboard, Enabled and configured the PIT to throw interrupts at a regular interval

This commit is contained in:
2021-12-20 21:53:57 +01:00
parent 23ede25ed6
commit 88cc1d75bb
10 changed files with 128 additions and 60 deletions

View File

@ -4,6 +4,7 @@
#include "io.h"
#define PORT 0x3f8
static int init_serial() {
printf("Init serial\n");
outb(PORT + 1, 0x00); // Disable all interrupts
outb(PORT + 3, 0x80); // Enable DLAB (set baud rate divisor)
outb(PORT + 0, 0x03); // Set divisor to 3 (lo byte) 38400 baud