summaryrefslogtreecommitdiff
path: root/src/include/toxic/vga.h
blob: b209bf74d5d98af2c825dff97e628b1fc0b27e7e (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
26
#ifndef VGA_H
#define VGA_H
#include <stddef.h>
#include <stdint.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 */