vga-text-cursor) gives MVH Kernel a full 80-column, 25-row text display backed by the standard VGA memory-mapped framebuffer at 0xB8000. It supports 16 foreground and 16 background colors, keeps the hardware cursor in sync with the shell prompt, and automatically scrolls the screen when output reaches the bottom. The driver is active for every text surface the kernel exposes — the interactive shell, the full-screen statics monitor, and the kernel panic display.
Features
80×25 Text Mode
The driver writes directly to the VGA framebuffer in standard 80-column by 25-row mode. Each cell stores a character byte and an attribute byte encoding foreground and background color.
16-Color Palette
You get 16 foreground colors and 16 background colors from the standard VGA text-mode palette. Colors are set per-character using the attribute byte.
Hardware Cursor
The driver synchronizes the blinking hardware text cursor with the shell prompt position via VGA CRTC register writes (
vga_cursor_enable / vga_cursor_disable). The statics monitor disables the cursor for a clean full-screen view.Auto-Scrolling
When output reaches row 24, the driver scrolls the entire buffer up by one row and clears the bottom line, so the shell never overflows the visible area.
Where the VGA Driver Is Used
The VGA driver is the primary output surface for all visible kernel output. Every component that writes text goes throughvga_put and vga_set_color.
Interactive Shell
Interactive Shell
All shell command output —
ls, cat, cpuinfo, lspci, date, dmesg, and every other command — is written to the VGA framebuffer. The hardware cursor tracks your input position at the mvh> prompt.Full-Screen Statics Monitor
Full-Screen Statics Monitor
The
statics command takes over the full 80×25 display to show a live system monitor. The hardware cursor is hidden during this mode. Press Q or Ctrl+C to return to the shell.Kernel Panic Display
Kernel Panic Display
When the kernel panics, the VGA driver renders the panic output in high-visibility colors directly to the framebuffer. This includes the panic code, decoded exception name and error code, RIP, RFLAGS, all general-purpose registers, control registers, and a frame-pointer stack trace.
Shell Commands That Use VGA Output
Every shell command produces VGA output. A few commands are specifically relevant to display behavior:API Reference
The VGA driver exposes the following functions frominclude/mvh/vga.h:
color attribute byte follows the standard VGA text-mode format: bits 3–0 are the foreground color index and bits 6–4 are the background color index (bit 7 is the blink flag).
Driver ID
The device manager registers this driver under the IDvga-text-cursor. Run devices in the shell to confirm it is online.