diff --git a/chroma/inc/kernel/system/heap.h b/chroma/inc/kernel/system/heap.h new file mode 100644 index 0000000..a0a2cc2 --- /dev/null +++ b/chroma/inc/kernel/system/heap.h @@ -0,0 +1,9 @@ +#ifndef KHEAP_H +#define KHEAP_H + +#include +#include + +uint8_t HeapEnabled = 0; + +#endif diff --git a/chroma/inc/kernel/video/tty.h b/chroma/inc/kernel/video/tty.h new file mode 100644 index 0000000..0fcab05 --- /dev/null +++ b/chroma/inc/kernel/video/tty.h @@ -0,0 +1,11 @@ +#ifndef _KERNEL_TTY_H +#define _KERNEL_TTY_H + +#include + +void Term_Init(void); +void Term_PutChar(char c); +void Term_Write(const char* str, size_t len); +void Term_WriteStr(const char* str); + +#endif diff --git a/chroma/inc/kernel/video/vga-textmode.h b/chroma/inc/kernel/video/vga-textmode.h new file mode 100644 index 0000000..9b3f978 --- /dev/null +++ b/chroma/inc/kernel/video/vga-textmode.h @@ -0,0 +1,34 @@ +#ifndef VGA_TEXTMODE_H +#define VGA_TEXTMODE_H + +#include + +enum VGA_COLOR { + VGA_COLOR_BLACK = 0, + VGA_COLOR_BLUE = 1, + VGA_COLOR_GREEN = 2, + VGA_COLOR_CYAN = 3, + VGA_COLOR_RED = 4, + VGA_COLOR_MAGENTA = 5, + VGA_COLOR_BROWN = 6, + VGA_COLOR_LIGHTGREY = 7, + VGA_COLOR_DARKGREY = 8, + VGA_COLOR_LIGHTBLUE = 9, + VGA_COLOR_LIGHTGREEN = 10, + VGA_COLOR_LIGHTCYAN = 11, + VGA_COLOR_PINK = 12, + VGA_COLOR_LIGHTMAGENTA = 13, + VGA_COLOR_LIGHTBROWN = 14, + VGA_COLOR_WHITE = 15, +}; + +static inline uint8_t VGACharColor(enum VGA_COLOR fg, enum VGA_COLOR bg) { + return fg | bg << 4; +} + +static inline uint8_t VGAChar(unsigned char uc, uint8_t color) { + return (uint16_t) uc | (uint16_t) color << 8; +} + +#endif + diff --git a/chroma/video/tty.d b/chroma/video/tty.d new file mode 100644 index 0000000..02cf1e2 --- /dev/null +++ b/chroma/video/tty.d @@ -0,0 +1,6 @@ +chroma/video/tty.o: chroma/video/tty.c chroma/inc/kernel/video/tty.h \ + chroma/inc/kernel/video/vga-textmode.h + +chroma/inc/kernel/video/tty.h: + +chroma/inc/kernel/video/vga-textmode.h: diff --git a/sync.iso b/sync.iso new file mode 100644 index 0000000..0bca3f7 Binary files /dev/null and b/sync.iso differ