Architecture - HenryLoenwind/4bit GitHub Wiki
Architecture
The 4bit computer has these parts:
- 256 bytes of program memory
- 256 nibbles of data memory
- 16 4-bit registers
- 1 8-bit instruction pointer (IP)
- 16 4-bit opcodes
The program memory is read-only. It cannot be addressed by opcodes directly, only their parameters ave available to the program. The execution starts at address 0 and will wrap if it runs over the end.
The data memory can be read and written freely. Depending on the environment, less than the maximum of 256 nibbles may be available. The data memory is zeroed at program start.
All registers may be hardware-mapped. Registers that are not mapped, start with a value of 0 at program start.
The instruction pointer can only be manipulated with the jmp instruction. It cannot be read.