aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/boot.s5
-rw-r--r--src/kernel.c15
2 files changed, 17 insertions, 3 deletions
diff --git a/src/boot.s b/src/boot.s
index 80c5738..053752a 100644
--- a/src/boot.s
+++ b/src/boot.s
@@ -1,3 +1,6 @@
+/* Copyright (c) 2026 Arslaan Pathan
+This software is licensed under the ARPL. See LICENSE for details. */
+
/* Multiboot header dark magic, do not touch */
.set ALIGN, 1<<0
.set MEMINFO, 1<<1
@@ -34,7 +37,7 @@ _start:
/* here we need to init crucial processor state.
load the gdt, enable pages, init isa extensions/floating point instructions and stuff
- for now just dont do anything we'll add that later */
+ for now just dont do anything we'll add that later(TM) */
/* enter the high level kernel
ABI says we need 16-byte alignment here, we aligned that before and pushed a multiple of 16 bits (zero) so we fine
diff --git a/src/kernel.c b/src/kernel.c
index eb5ac45..ae50def 100644
--- a/src/kernel.c
+++ b/src/kernel.c
@@ -1,3 +1,6 @@
+/* Copyright (c) 2026 Arslaan Pathan
+This software is licensed under the ARPL. See LICENSE for details. */
+
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
@@ -9,7 +12,7 @@
/* This operating system will only work for the 32-bit ix86 targets. */
#if !defined(__i386__)
-#error "This tutorial needs to be compiled with a ix86-elf compiler"
+#error "this operating system needs to be compiled with a ix86-elf compiler"
#endif
/* Hardware text mode color constants. */
@@ -86,7 +89,14 @@ void terminal_putentryat(char c, uint8_t color, size_t x, size_t y)
void terminal_putchar(char c)
{
+ if (c == '\n') {
+ terminal_column = 0;
+ ++terminal_row;
+ return;
+ }
+
terminal_putentryat(c, terminal_color, terminal_column, terminal_row);
+
if (++terminal_column == VGA_WIDTH) {
terminal_column = 0;
if (++terminal_row == VGA_HEIGHT)
@@ -110,7 +120,8 @@ void kernel_main(void)
/* Initialize terminal interface */
terminal_initialize();
- terminal_writestring("Hello, kernel World!\n");
+ terminal_writestring("loading FrenchToastOS...\n");
+ terminal_writestring("developed by Arslaan Pathan");
while (1) {
__asm__ __volatile__ ("hlt");