summaryrefslogtreecommitdiff
path: root/Q1.core/Arch/ChipLayout.cs
blob: 6c7187bac5d536ea11bcbd0cf541f12ddd889f0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
namespace Q1.core.Arch;

public static class ChipLayout
{
    public const u16 MEMORY_START = 0x0000;
    public const u16 MEMORY_SIZE = 0x4000; // 16KB of memory (0x0000 to 0x3FFF)
    
    public const u16 IVT_START = ChipLayout.MEMORY_START;
    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_COUNT = 256;
    public const u16 STACK_SIZE = ChipLayout.STACK_COUNT * 2; // Each stack entry is 2 bytes (u16)
    
    public const u16 PROGRAM_START = ChipLayout.STACK_START + ChipLayout.STACK_SIZE;
}