nx_nishios_boot_gui.nx
buildroot/runtime/nx_nishios_boot_gui.nx
about
nx_nishios_boot_gui.nx -- NishiOS KEYSTONE rung: BOOT -> GUI (the two halves fused).
The boot/loader half (real-mode boot, INT13h loader) and the GUI half (framebuffer compositor) have
been proven separately. This connects them: an x86 kernel BOOTS on the sovereign emu -- prints
"NISHIOS" over the UART and enters PROTECTED mode (the real mode transition) -- and then the kernel's
sovereign framebuffer driver (nx_fb) initializes a linear framebuffer and DRAWS THE DESKTOP into it.
Export = nishios_boot_screen.bmp = "what the screen shows after boot". This is the single picture of
the whole thing: power on -> kernel -> desktop.
KAT: the boot reached protected mode, the UART banner is "NISHIOS", and the post-boot framebuffer holds
the desktop (background + window + title text); BMP exported.
HONEST SEAM (no overclaim): the emu EXECUTES the boot + mode transition as real x86; the desktop is
drawn by nx_fb -- the kernel's framebuffer driver written in NishiLang, the SAME sovereign language the
kernel compiles from. Running the draw loop itself as x86-on-the-emu (vs calling the NishiLang driver)
+ a real VESA/GOP framebuffer on hardware are the next rungs. No hw writes (Rule 26).
expect_exit: 0 license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_fb.nxnx_font8x8.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 17 | const K_MAGIC_1024: i64 = 1024 |
| 18 | const K_MAGIC_192054: i64 = 192054 |
functions
| 20 | func bg_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 1: main |
| 21 | func bg_num(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 } called by 1: main |
| 22 | func bg_beq(a: *u8, b: *u8, n: i64) -> i64 { var i: i64=0; while i<n { if a[i]!=b[i] { return 0 } i=i+1 } return 1 } called by 1: main |
| 23 | func bg_i32(c: *u8, o: i64) -> i64 { return (c[o] as i64) | ((c[o+1] as i64)<<8) | ((c[o+2] as i64)<<16) | ((c[o+3] as i64)<<24) } called by 1: boot_kernel |
| 24 | func bg_b(c: *u8, o: i64, b: i64) -> i64 { c[o]=(b & 0xff) as u8; return o+1 } |
| 25 | func bg_mode(cr0: i64, efer: i64) -> i64 { let pe: i64=cr0&1; let pg: i64=(cr0>>31)&1; let lme: i64=(efer>>8)&1; if pe==0 { return 0 } if pg==1 { if lme==1 { return 2 } } return 1 } called by 1: boot_kernel |
| 28 | func boot_kernel(code: *u8, len: i64, uart: *u8, ulen: *i64, st: *i64) -> i64 |
| 52 | func emit_uart_str(c: *u8, o: i64, s: *u8) -> i64 |
| 58 | func main() -> i64 |