Debian Codegraph @

src/include/pc80/vga.h

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 #ifndef VGA_H
4 #define VGA_H
5
6 #define VGA_FB 0xB8000
7 #define VGA_FB_SIZE 0x4000 /* char + attr = word sized so 0x8000 / 2 */
8 #define VGA_COLUMNS 80
9 #define VGA_LINES 25
10
11 #define VGA_TEXT_HORIZONTAL_TOP 0
12 #define VGA_TEXT_HORIZONTAL_MIDDLE (VGA_LINES / 2)
13
14 enum VGA_TEXT_ALIGNMENT {
15 VGA_TEXT_LEFT,
16 VGA_TEXT_CENTER,
17 VGA_TEXT_RIGHT,
18 };
19
20 void vga_io_init(void);
21
22 void vga_textmode_init(void);
23
24 void vga_cursor_enable(int enable);
25 void vga_cursor_reset(void);
26 void vga_cursor_set(unsigned int line, unsigned int character);
27
28 void vga_frame_set(unsigned int line, unsigned int character);
29
30 void vga_line_write(unsigned int line, const char *string);
31
32 /*
33 * vga_write_text() writes a line of text aligned left/center/right
34 * horizontally on the screen (i.e. enum VGA_TEXT_ALIGNMENT)
35 */
36 void vga_write_text(enum VGA_TEXT_ALIGNMENT alignment, unsigned int line,
37 const unsigned char *ustring);
38
39 #endif /* VGA_H */