Add stupid first serial output

This commit is contained in:
Justin C. Miller
2018-04-23 10:22:02 -07:00
parent 1113164505
commit ef24894211
3 changed files with 50 additions and 0 deletions

19
src/kernel/io.h Normal file
View File

@@ -0,0 +1,19 @@
#pragma once
#include <stdint.h>
extern "C" {
/// Read a byte from an IO port.
/// \arg port The address of the IO port
/// \returns One byte read from the port
uint8_t inb(uint16_t port);
/// Write a byte to an IO port.
/// \arg port The addres of the IO port
/// \arg val The byte to write
void outb(uint16_t port, uint8_t val);
}
const uint16_t COM1 = 0x03f8;