Docs: Update todos re: invoking the cpu/assembler; move notes on this from `run-cpu.js` to `todo.md`

This commit is contained in:
n loewen 2023-08-16 16:36:01 +01:00
parent 12f8e39c54
commit ffe96962a4
2 changed files with 18 additions and 14 deletions

View File

@ -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

View File

@ -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');