diff options
| author | user <user@clank> | 2026-07-16 15:45:09 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-07-16 15:45:09 +0200 |
| commit | 7274084cc07a473c530b129aa217f586781ba70c (patch) | |
| tree | ff51346fa5939c6b60e2eb9b4f88f73dcc5ff22d /src/syscall.asm | |
| parent | term: cursor + O(1) line scrolling (diff) | |
| download | gbos-7274084cc07a473c530b129aa217f586781ba70c.tar.gz gbos-7274084cc07a473c530b129aa217f586781ba70c.tar.xz gbos-7274084cc07a473c530b129aa217f586781ba70c.zip | |
syscall: mirror console output to the LCD terminal
KPutc's console path now renders each byte on the LCD terminal via
term_putc in addition to the serial write. Serial is kept so scripted
tests still capture output (and for link-cable/debug), while the shell,
command output, and echoed input now appear on-screen in the 40-col font
with a live cursor and scrolling. Dropped the boot-time term_demo; the
terminal starts blank and fills from real console traffic.
term_putc now saves/forces/restores SVBK=1 so it always reads and writes
the terminal buffer/state in WRAM bank 1, regardless of which process
context KPutc is invoked from (defensive; all procs currently use bank 1).
The stack lives in non-banked WRAM, so saving SVBK across the switch is safe.
Verified: a headless run of `uname; ls; echo hello world` renders each
prompt, the echoed command, and its output on the LCD (captured via the
new `--headless --shot` path), and serial capture is unchanged.
Diffstat (limited to 'src/syscall.asm')
| -rw-r--r-- | src/syscall.asm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/syscall.asm b/src/syscall.asm index 5557b5f..870a2ff 100644 --- a/src/syscall.asm +++ b/src/syscall.asm @@ -149,9 +149,11 @@ KPutc:: jp sys_putb ; B=fd, E=byte .console ld a, [wKChar] - ld [rSB], a + ld [rSB], a ; mirror to serial (test capture / link) ld a, $81 ld [rSC], a + ld a, [wKChar] + call term_putc ; and render on the LCD terminal ret ; ----------------------------------------------------------------------------- |
