From 627f05098785327744e666c9149375125499d2ff Mon Sep 17 00:00:00 2001 From: hachem Date: Sun, 4 Oct 2026 00:52:49 +0200 Subject: feat: revelfs type shi --- kernel/console.rv | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'kernel/console.rv') diff --git a/kernel/console.rv b/kernel/console.rv index d0ee43c..2083817 100644 --- a/kernel/console.rv +++ b/kernel/console.rv @@ -1,5 +1,5 @@ -const FW = 8 # glyph width in pixels -const FH = 16 # glyph height in pixels (8x16 vga bitmap font) +const FW = 8 # glyph width in pixels +const FH = 16 # glyph height in pixels (8x16 vga bitmap font) const FG = 0xd0d0d0 const CON_BG = 0x101018 @@ -39,6 +39,7 @@ end # we dont do shift/cntrl # thats a job for future me lmao +# NOTE: future me kinda delt with it, i was mad drunk fn con_putc(ch) do const code = ch:ascii() if code == 10 do con_newline() return :nil end # \n @@ -58,7 +59,7 @@ fn puts(str) serial_puts(str) const CUR = 0x50fa7b # the cursor is an overlay block. its cleared before any drawing and shown after, # so it never sits under a glyph, cur_x/cur_y remember where it was actually drawn -# so we always clear the right cell even after the head moved (backspace etc) +# so we always clear the right cell even after the head moved (backspace and shit) fn cursor_clear() do if con.shown do fill_rect(con.cur_x * cell_w(), con.cur_y * cell_h(), cell_w(), cell_h(), CON_BG) @@ -84,9 +85,6 @@ global flush_console = fn() do cursor_show() end -# called each pit tick from the event loop (scheduler task 0). render any output a -# running process left in the serial mirror (this is how its writes reach the -# screen while time sliced), reprint the prompt when one exits, else blink global on_tick = fn(ticks) do let byte = serial_next() if byte >= 0 do -- cgit v1.3