# Cardiograph issues ## Open ### #4 - Add single stepping Q: should this be part of a more complex monitor interface? See note from [2023-08-31](../2023-08-31.md#microprocessor-trainer-style-keypad) Or, a simpler option would be to add a command line flag: -s --singlestep (Adapted from [#1](#1---improve-cli-interface)) ### #3 - Add plain-text display output With a command line option on `cardiograph.js`: -p, --prettydisplay (Adapted from [#1](#1---improve-cli-interface)) ### #2 - Startup: Execute `JMP $FF` See [2023-08-24](../notes/2023-08-24.md#cpu-start-up) ... say that there's a 1-byte ROM at $FF. - `00-19` - display (5x5) - `1A ` - pointer to display memory - `1B ` - keypad: value of latest key pressed - `1C ` - reserved for future use (bank switching flag) - `1D ` - initial IP - `1D-FE` - free - `FF ` - ROM (unwriteable) - pointer to initial IP - store `$1D` at `$FF` - make CPU execute `JMP $FF` on startup - make ROM unwriteable More step-by-step: - Change memory from a Uint8Array to a regular array, and make every entry { number | { type: 'ROM', value: number }} - Store ROM as an object in machine.config.js - Load ROM data into memory at CPU startup (`startCPU(RAM, ROM)`) ## Closed ### #1 - Improve CLI interface 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