From de725da74db5cba0f9bfd0755269e1683423d87b Mon Sep 17 00:00:00 2001 From: user Date: Wed, 15 Jul 2026 23:44:28 +0200 Subject: gbos scaffold: working cooperative microkernel (verified ABAB in emulator) - fix ClearKernelRAM clobbering the kernel stack (only clear $C000-$CBFF) - fix SyscallTrap clobbering DE (buffer arg) during table dispatch - README: run via ~/dev/gbc --headless; note bring-up bugs --- src/tty.asm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/tty.asm (limited to 'src/tty.asm') diff --git a/src/tty.asm b/src/tty.asm new file mode 100644 index 0000000..d2c1234 --- /dev/null +++ b/src/tty.asm @@ -0,0 +1,15 @@ +; ============================================================================= +; tty.asm - console output over the serial port (emulator debug channel). +; A real gbos would render to VRAM; serial is a zero-VRAM stub that shows up +; in emulator serial logs (bgb/SameBoy) and on link hardware. +; ============================================================================= +INCLUDE "include/gbos.inc" + +SECTION "tty", ROM0 + +; PutChar - A = character. Push to serial data and kick a transfer. +PutChar:: + ld [rSB], a + ld a, $81 ; start transfer, internal clock + ld [rSC], a + ret -- cgit v1.3.1-sl0p