From 62de41dbc254298fa207fd5649a90de06f7e02f1 Mon Sep 17 00:00:00 2001 From: WlodekM Date: Wed, 2 Apr 2025 21:50:00 +0300 Subject: i think it's done --- runtime.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'runtime.ts') diff --git a/runtime.ts b/runtime.ts index d74e230..2759b6e 100644 --- a/runtime.ts +++ b/runtime.ts @@ -53,13 +53,17 @@ cpu.cycle() //the cpu reset, pull RESB high and start execution! cpu.io.reset.HI() +const debug = Deno.args.includes('-d') + while (!cpu.io.interruptRequest.high) { cpu.cycle(); - const i = new Uint8Array(8); - await Deno.stdin.read(i); - if (i[0] == 'b'.charCodeAt(0)) { - console.log('BREAK!!') - break; + if (debug) { + const i = new Uint8Array(8); + await Deno.stdin.read(i); + if (i[0] == 'b'.charCodeAt(0)) { + console.log('BREAK!!') + break; + } } } -- cgit 1.4.1-2-gfad0