diff options
| author | Melodi <62381002+Melodi17@users.noreply.github.com> | 2026-03-18 06:50:43 +1000 |
|---|---|---|
| committer | Melodi <62381002+Melodi17@users.noreply.github.com> | 2026-03-18 06:50:43 +1000 |
| commit | 08ee9a129c81cc1cafcfe830b02b4f9c036334ca (patch) | |
| tree | 6e4dcbeff96bbbbe65deff7312b416cd50ae69bf /Q1.core/Arch/ChipLayout.cs | |
| parent | c528862deca86c606cead1c9d199ff22a6b4ac89 (diff) | |
add: Initial implementation of all instructions
Diffstat (limited to 'Q1.core/Arch/ChipLayout.cs')
| -rw-r--r-- | Q1.core/Arch/ChipLayout.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Q1.core/Arch/ChipLayout.cs b/Q1.core/Arch/ChipLayout.cs index 2948f9a..6c7187b 100644 --- a/Q1.core/Arch/ChipLayout.cs +++ b/Q1.core/Arch/ChipLayout.cs @@ -6,10 +6,12 @@ public static class ChipLayout public const u16 MEMORY_SIZE = 0x4000; // 16KB of memory (0x0000 to 0x3FFF) public const u16 IVT_START = ChipLayout.MEMORY_START; - public const u16 IVT_SIZE = 256; // 256 bytes for 128 interrupt vectors (2 bytes each) + public const u16 IVT_COUNT = 128; // 128 interrupt vectors + public const u16 IVT_SIZE = ChipLayout.IVT_COUNT * 2; // Each vector is 2 bytes (u16) public const u16 STACK_START = ChipLayout.IVT_START + ChipLayout.IVT_SIZE; - public const u16 STACK_SIZE = 256 * 2; // 256 words (512 bytes) + public const u16 STACK_COUNT = 256; + public const u16 STACK_SIZE = ChipLayout.STACK_COUNT * 2; // Each stack entry is 2 bytes (u16) - public const u16 PROGRAM_START = ChipLayout.MEMORY_START + ChipLayout.STACK_SIZE; + public const u16 PROGRAM_START = ChipLayout.STACK_START + ChipLayout.STACK_SIZE; }
\ No newline at end of file |
