summaryrefslogtreecommitdiff
path: root/src/include/toxic
diff options
context:
space:
mode:
authorCarlos Maiolino <[email protected]>2025-07-26 15:27:23 +0200
committerCarlos Maiolino <[email protected]>2025-07-26 15:27:23 +0200
commitfd9f4bd7724b4440bede4ccbb3670e88289402d9 (patch)
treedc9921957e3afeffbafdaf8cf6ea88d6ce446389 /src/include/toxic
parent02a4f7fa2100809d84b93dbe8d6c828e4768ad41 (diff)
Move include files to a subdirectory
Move the include files to the toxic/ subdirectory, so it gets a bit more organized. Ah, yeah, OS name will be renamed to ToxicOS Signed-off-by: Carlos Maiolino <[email protected]>
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 */