From e015581b2eedb5294ca0b5fc073b4aa2d892100c Mon Sep 17 00:00:00 2001 From: TQ Hirsch Date: Wed, 27 Sep 2023 17:59:46 +0200 Subject: [PATCH] Show lights in xterm title --- src/main/kotlin/com/thequux/mcpdp/core/CPU.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/thequux/mcpdp/core/CPU.kt b/src/main/kotlin/com/thequux/mcpdp/core/CPU.kt index 66f7366..ce4a76e 100644 --- a/src/main/kotlin/com/thequux/mcpdp/core/CPU.kt +++ b/src/main/kotlin/com/thequux/mcpdp/core/CPU.kt @@ -1052,7 +1052,9 @@ class CPU(val mbus: MemBus, var tracer: ITracer = NullTracer()) { } override fun setw(addr: UInt, value: UShort) = when (addr) { - 0x3_FF78u -> {} // console switch/display reg + 0x3_FF78u -> { + System.err.print("\u001b]0;${value.toOctal()}\u0007") + } // console switch/display reg 0x3_FFE6u -> control_reg = value 0x3_FFF0u , 0x3_FFF2u , 0x3_FFF4u, 0x3_FFF8u -> {} // read-only registers 0x3_FFF6u -> cpu_err = value