blu_os
Loading...
Searching...
No Matches
vga.h
1//
2// Created by dylan on 07/07/2026.
3//
4
5#ifndef BLU_OS_VGA_H
6#define BLU_OS_VGA_H
7
8#include <stddef.h>
9#include <stdint.h>
10
11#define VGA_WIDTH 80
12#define VGA_HEIGHT 25
13
14#ifdef __x86_64__
15#define VGA_MEMORY 0xFFFFFFFF800B8000
16#else
17#define VGA_MEMORY 0xb8000
18#endif
19
20enum VGAColor {
21 VGA_COLOR_BLACK = 0,
22 VGA_COLOR_BLUE = 1,
23 VGA_COLOR_GREEN = 2,
24 VGA_COLOR_CYAN = 3,
25 VGA_COLOR_RED = 4,
26 VGA_COLOR_MAGENTA = 5,
27 VGA_COLOR_BROWN = 6,
28 VGA_COLOR_LIGHT_GREY = 7,
29 VGA_COLOR_DARK_GREY = 8,
30 VGA_COLOR_LIGHT_BLUE = 9,
31 VGA_COLOR_LIGHT_GREEN = 10,
32 VGA_COLOR_LIGHT_CYAN = 11,
33 VGA_COLOR_LIGHT_RED = 12,
34 VGA_COLOR_LIGHT_MAGENTA = 13,
35 VGA_COLOR_LIGHT_BROWN = 14,
36 VGA_COLOR_WHITE = 15
37};
38
39uint8_t vgaEntryColor(enum VGAColor fg, enum VGAColor bg);
40
41uint16_t vgaEntry(uint8_t uc, uint8_t color);
42
43#endif // BLU_OS_VGA_H
Common definitions for C programs.
Fixed-width integer types.