aboutsummaryrefslogtreecommitdiffstats
path: root/src/tty.asm
diff options
context:
space:
mode:
authoruser <user@clank>2026-07-15 23:44:28 +0200
committeruser <user@clank>2026-07-15 23:44:28 +0200
commitde725da74db5cba0f9bfd0755269e1683423d87b (patch)
treedc39eca9fbd290393ed51de31eee5e4bd6af8375 /src/tty.asm
downloadgbos-de725da74db5cba0f9bfd0755269e1683423d87b.tar.gz
gbos-de725da74db5cba0f9bfd0755269e1683423d87b.tar.xz
gbos-de725da74db5cba0f9bfd0755269e1683423d87b.zip
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
Diffstat (limited to 'src/tty.asm')
-rw-r--r--src/tty.asm15
1 files changed, 15 insertions, 0 deletions
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