From ffe96962a4dfe27a73934de1a4ef4f2830f5cc05 Mon Sep 17 00:00:00 2001 From: n loewen Date: Wed, 16 Aug 2023 16:36:01 +0100 Subject: [PATCH] Docs: Update todos re: invoking the cpu/assembler; move notes on this from `run-cpu.js` to `todo.md` --- notes/todo.md | 24 ++++++++++++++++++------ run-cpu.js | 8 -------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/notes/todo.md b/notes/todo.md index 8c1009d..e72d227 100644 --- a/notes/todo.md +++ b/notes/todo.md @@ -33,10 +33,7 @@ ## Run-scripts -- [ ] Change interface to run in non-debug mode by default, and use a flag to select debug mode: - - `./run-cpu.js foo.asm` - - `./run-cpu.js --debug foo.asm` - - `./run-cpu.js -d foo.asm` +- [ ] Replace with running `./cpu.js` and `./assembler.js` diretly ## Simulator @@ -47,8 +44,23 @@ ### CPU -- [/] Add single-stepping - - [ ] Make it work with simulated keypad +- [ ] Make single-stepping work with simulated keypad + +- [ ] Allow running pre-compiled machine code + + I'm thinking of an interface like this... + + $ ./cpu.js -mc code.bin + $ ./cpu.js code.asm + $ ./cpu.js --debug code.asm + + Full list of flags I want: + + -d --debug + -s --singlestep + -p --prettydisplay + -mc --machinecode + ### Possible under-the-hood improvements diff --git a/run-cpu.js b/run-cpu.js index 0a15efc..ec93b14 100755 --- a/run-cpu.js +++ b/run-cpu.js @@ -5,14 +5,6 @@ // Run with single-stepping: `./run-cpu.js step assembly.asm` // Debug with single-stepping: `./run-cpu.js stepdebug assembly.asm` -// TODO: allow running pre-compiled machine code. -// -// i'm thinking of an interface like this... -// -// $ ./run-cpu -mc code.bin -// $ ./run-cpu code.asm -// $ ./run-cpu --debug code.asm - const fs = require('fs'); const computer = require('./cpu.js'); const assembler = require('./assembler.js');