From 68ae53a24590a01d4a7996cc60c0f31b55e27116 Mon Sep 17 00:00:00 2001 From: n loewen Date: Thu, 24 Aug 2023 12:17:24 +0100 Subject: [PATCH] (issues) issues - Add "execute JMP FF on startup" issue --- notes/issues/issues.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/notes/issues/issues.md b/notes/issues/issues.md index c660488..59f7756 100644 --- a/notes/issues/issues.md +++ b/notes/issues/issues.md @@ -17,4 +17,30 @@ Full list of flags I want: -p --prettydisplay -mc --machinecode +### #2 - Startup: Execute `JMP $FF` + +See [2023-08-24](../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 \ No newline at end of file