summary refs log tree commit diff
path: root/runtime.ts
diff options
context:
space:
mode:
authorWlodekM <[email protected]>2025-04-05 15:51:22 +0300
committerWlodekM <[email protected]>2025-04-05 15:51:22 +0300
commitfd53ef569512f657fef6ae6bdca51bfea777478d (patch)
tree87a490a2093579b58f419992411fe9fc7d4be8fd /runtime.ts
parenta3dc6ddf93f0789636ea7064844ab696e819955d (diff)
uuh i forgor HEAD master
Diffstat (limited to 'runtime.ts')
-rw-r--r--runtime.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime.ts b/runtime.ts
index a7bf146..5bfafef 100644
--- a/runtime.ts
+++ b/runtime.ts
@@ -2,7 +2,9 @@ import The65c02, { BitField, Pin } from "./65c02.ts";
 import matrix from "./opcode_matrix.json" with { type: "json" };
 import { parseArgs } from "jsr:@std/cli/parse-args";
 
-const debug = Deno.args.includes('-d')
+const args = parseArgs(Deno.args)
+
+const debug = args.d
 
 // the thing used for ram
 const ram = new Uint8Array(2**16);
@@ -27,8 +29,6 @@ await cpu.loadInstructions()
 // test
 cpu.stackPointer.set(0xFF)
 
-const args = parseArgs(Deno.args)
-
 const binStart = parseInt(args.b ?? args.binStart ?? '8000', 16)
 const resVec = parseInt(args.s ?? args.start ?? binStart.toString(16), 16)