cardiograph-computer/issues/issues.md

46 lines
1.0 KiB
Markdown

# Cardiograph issues
## Open
### #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
### #2 - Startup: Execute `JMP $FF`
See [2023-08-24](../notes/2023-08-24--dev-notes.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