summaryrefslogtreecommitdiff
path: root/src/include/toxic
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/toxic')
-rw-r--r--src/include/toxic/kernel.h6
-rw-r--r--src/include/toxic/string.h10
-rw-r--r--src/include/toxic/vga.h25
3 files changed, 41 insertions, 0 deletions
diff --git a/src/include/toxic/kernel.h b/src/include/toxic/kernel.h
new file mode 100644
index 0000000..2007693
--- /dev/null
+++ b/src/include/toxic/kernel.h
@@ -0,0 +1,6 @@
+#ifndef KERNEL_H
+#define KERNEL_H
+
+void kernel_main();
+
+#endif /* KERNEL_H */
diff --git a/src/include/toxic/string.h b/src/include/toxic/string.h
new file mode 100644
index 0000000..69d8bd2
--- /dev/null
+++ b/src/include/toxic/string.h
@@ -0,0 +1,10 @@
+#ifndef STRING_H
+#define STRING_H
+
+#include <stddef.h>
+
+size_t strlen(const char *s);
+char *strcpy(char *restrict dst, const char *restrict src);
+
+void *memset(void *s, int c, size_t n);
+#endif /* STRING_H */
diff --git a/src/include/toxic/vga.h b/src/include/toxic/vga.h
new file mode 100644
index 0000000..7aaa210
--- /dev/null
+++ b/src/include/toxic/vga.h
@@ -0,0 +1,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 */