Working kernel written on C and userspace-ready #1

Merged
sonya merged 61 commits from dev into main 2026-05-03 09:13:20 +00:00
2 changed files with 2 additions and 21 deletions
Showing only changes of commit 0c1585a169 - Show all commits
+1 -1
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.20)
project(ksOSKernel LANGUAGES ASM C) project(ksOSKernel LANGUAGES ASM C)
set(KERNEL_MODULE_NAME "Kernel") set(KERNEL_MODULE_NAME "Kernel")
+1 -20
View File
@@ -1,23 +1,4 @@
@_cdecl("kmain") @_cdecl("kmain")
public func kernelMain(_ bootInfo: UnsafeMutablePointer<Bootinfo>) { public func kernelMain(_ bootInfo: UnsafeMutablePointer<Bootinfo>) {
let fb = bootInfo.pointee.framebuffer kprint("Test nya")
let pixels = fb.base!
let width = Int(fb.width)
let height = Int(fb.height)
let total = width * height
let stripe = total / 5
var i = 0
while i < total {
let s = i / stripe
let color: UInt32
if s == 0 || s >= 4 { color = 0x5BCEFA }
else if s == 2 { color = 0xFFFFFF }
else { color = 0xF5A7B8 }
pixels[i] = color
i &+= 1
}
kprint("Meow prrr meow nyaaa\n")
} }