aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorMarin Ivanov <[email protected]>2024-05-01 23:12:21 +0300
committerMarin Ivanov <[email protected]>2024-05-01 23:12:21 +0300
commitbf67bb3b39cf8acad442bc4731c6f300697ad992 (patch)
treeeff5c6a5f13cc82ea1a587f4999784d81b03bf33 /src/main.zig
parent8a0560edda7ba516625d310cc1b6b995fd5ad672 (diff)
add 32-bit assembly
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/main.zig b/src/main.zig
index 76bdadf..f3ea424 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -1,9 +1,12 @@
+comptime {
+ asm (@embedFile("boot.s"));
+}
+
const debug = @import("debugcon.zig");
const ALIGN = 1 << 0;
const MEMINFO = 1 << 1;
const MAGIC = 0xE85250D6;
-// const FLAGS = ALIGN | MEMINFO;
const FLAGS = 0;
const MultibootHeader = extern struct {
@@ -27,14 +30,6 @@ export const multiboot2 align(4) linksection(".multiboot") = MultibootHeader{
.tag2 = 8,
};
-export fn _start() callconv(.Naked) noreturn {
- asm volatile (
- \\ mov _sstack, %rsp
- \\ mov %rsp, %rbp
- );
- asm volatile ("jmp kmain");
-}
-
var vga = @as([*]volatile u16, @ptrFromInt(0xB8000));
export fn kmain() noreturn {