nx_nishios_term.nx
buildroot/runtime/nx_nishios_term.nx
about
nx_nishios_term.nx -- NishiOS GUI rung-4: a TERMINAL WINDOW rendering REAL system content.
This is where the GUI meets the actual ecosystem: a terminal window that READS a real sovereign file
(the replacement-tools registry) and renders it as text using the existing full 8x8 ASCII font
(nx_font8x8 font8x8_table, printable 0x20..0x7E) into the framebuffer (nx_fb). Not lorem-ipsum --
genuine bytes off disk, drawn glyph by glyph, with a blinking-style cursor block.
KAT: the terminal window is drawn, the header line renders (text pixels present), the real file is
read (len>0) and its lines render in the body (text pixels present), and the BMP exports.
HONEST SCOPE: renders a file's bytes (a `cat`); a LIVE shell (typing + running tools in the window)
needs the PS/2 keyboard driver + wiring the bridge in -- 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
| 13 | const K_MAGIC_192054: i64 = 192054 |
functions
| 15 | func tm_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 |
| 16 | func tm_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 |
| 19 | func term_char(fb: *u8, W: i64, H: i64, table: *u8, x: i64, y: i64, scale: i64, ch: i64, r: i64, g: i64, b: i64) -> i64 |
| 27 | func term_str(fb: *u8, W: i64, H: i64, table: *u8, x: i64, y: i64, scale: i64, s: *u8, r: i64, g: i64, b: i64) -> i64 |
| 33 | func count_text(fb: *u8, W: i64, x0: i64, y0: i64, x1: i64, y1: i64) -> i64 called by 1: main |
| 40 | func main() -> i64 |