summaryrefslogtreecommitdiff
path: root/src/include/toxic/vga.h
blob: 7aaa210657a8ded299f8be976dcdd63c5d8a4ee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef VGA_H
#define VGA_H
#include <stddef.h>

#define VGA_ADDRESS 0xb8000
#define VGA_WIDTH 80
#define VGA_HEIGHT 20

struct vga_display {
	uint16_t	*buf;
	uint16_t	color;
	size_t		row;
	size_t		col;
};

extern struct vga_display display;

void vga_put_char(size_t row, size_t col, char c, uint16_t color);
void vga_write_char(char c);
void vprintl(char *str);

void init_display(uint16_t color);


#endif /* VGA_H */