diff options
| author | andromeda <andromeda@bsd.my.domain> | 2026-10-19 23:20:53 -0400 |
|---|---|---|
| committer | andromeda <andromeda@bsd.my.domain> | 2026-10-19 23:20:53 -0400 |
| commit | 4a06a0a7519089caad53f72c8c8c2ebc3592091e (patch) | |
| tree | 8e0655144808ca3e6545ca25f7a32860bab63f2e | |
| parent | bf66d1d2dd67cf3ee3d052cd272d2d1e1dba65f3 (diff) | |
.c3fmt, hello world
| -rw-r--r-- | .c3fmt | 2 | ||||
| -rw-r--r-- | main.c3 | 15 |
2 files changed, 15 insertions, 2 deletions
@@ -0,0 +1,2 @@ +newline_at_eof: true +max_line_length: 132 @@ -18,15 +18,26 @@ module c3os; import uefi; +EfiHandle eh; +SystemTable* st; + fn EfiStatus efi_main(EfiHandle image_handle, SystemTable* system_table) @export("efi_main") { + eh = image_handle; + st = system_table; + + st.conOut.@output_string("Hello World!\n"); + + spin(); return SUCCESS; } alias PanicFn = fn void(String message, String file, String function, int line); PanicFn panicfn = &_panicfn; -fn void _panicfn(String reason, String file = "", String func = "", int line = 0) +fn void _panicfn(String reason, String file = "", String func = "", int line = 0) => spin(); + +fn void spin() { asm("cli"); asm("hlt"); -}
\ No newline at end of file +} |
