Writing (debug output) to screen

This commit is contained in:
2017-12-04 00:22:39 +01:00
parent b9e9df32f5
commit 4f00d428bf
5 changed files with 134 additions and 26 deletions

14
src/kernel/include/vga.h Normal file
View File

@@ -0,0 +1,14 @@
#pragma once
#define VGA_COLS 80
#define VGA_ROWS 24
#define VGA_SIZE (VGA_COLS*VGA_ROWS)
#define VGA_ROW(pos) ((pos)/VGA_COLS)
#define VGA_COL(pos) ((pos)%VGA_COLS)
#define VGA_POS(row, col) ((row)*VGA_COLS + (col))
#define VGA_MEMORY P2V(0xB8000)
void vga_init();
void vga_write(char c);