summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/pc80/vga.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/pc80/vga.h b/src/include/pc80/vga.h
index 4b7b26c36c..ec012f5bdf 100644
--- a/src/include/pc80/vga.h
+++ b/src/include/pc80/vga.h
@@ -8,6 +8,15 @@
#define VGA_COLUMNS 80
#define VGA_LINES 25
+#define VGA_TEXT_HORIZONTAL_TOP 0
+#define VGA_TEXT_HORIZONTAL_MIDDLE (VGA_LINES / 2)
+
+enum VGA_TEXT_ALIGNMENT {
+ VGA_TEXT_LEFT,
+ VGA_TEXT_CENTER,
+ VGA_TEXT_RIGHT,
+};
+
void vga_io_init(void);
void vga_textmode_init(void);
@@ -20,4 +29,10 @@ void vga_frame_set(unsigned int line, unsigned int character);
void vga_line_write(unsigned int line, const char *string);
+/*
+ * vga_write_text() writes a line of text aligned left/center/right
+ * horizontally on the screen (i.e. enum VGA_TEXT_ALIGNMENT)
+ */
+void vga_write_text(enum VGA_TEXT_ALIGNMENT alignment, unsigned int line, const char *string);
+
#endif /* VGA_H */