From ccebc6ec3d357b7d324959fa57969875d7c01163 Mon Sep 17 00:00:00 2001 From: n loewen Date: Mon, 28 Aug 2023 15:56:28 -0400 Subject: [PATCH] (notes) 2023-08-28 - Create note outlining plans to re-architect the simulator --- notes/2023-08-28--dev-notes.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 notes/2023-08-28--dev-notes.md diff --git a/notes/2023-08-28--dev-notes.md b/notes/2023-08-28--dev-notes.md new file mode 100644 index 0000000..88b39d5 --- /dev/null +++ b/notes/2023-08-28--dev-notes.md @@ -0,0 +1,26 @@ +# Dev notes — 2023-08-28 + +Two current goals: + +## 1. Implement a new CLI interface + +- New arg-parser +- Allow setting clock speed with a command line flag + + +## 2. Re-architect + +- Move the bulk of cpu.js to cpu.lib.js +- Add a way to register functions to be called each cycle +- Create a new 'cardiograph.js' + - imports cpu.lib.js + - registers functions for logging, updating display + - (split those apart) + - provides terminal interface + - get machine code input from stdin (or like, file stream?) + - `./assembler.js | ./cardiograph.js + - see below re: changes to assembler +- Assembler + - Move CLI interface into assembler.js and delete run-assembler.js + - Add a --json flag, which causes the assembler to print the json of {machineCode, debugInfo} on stdin + - Otherwise, print hex/bin to stdin \ No newline at end of file