Self-study of CPU, RAM and Kernel operations.
In simple terms, it's a very basic "Virtual machine"
It can execute simple custom bytecode, write to memory, read from memory, execute simple functions, read/write registers, do simple math.
All memory lives on stack, no heap implementation (yet)
Working Frame/Page allocation for processes.
| Opcode |
Instruction |
Operands |
| 0x00 |
HALT |
halt |
| 0x01 |
MOVE |
regX, immediate |
| 0x02 |
ADD |
regX, regY |
| 0x03 |
PUSH |
regX |
| 0x04 |
POP |
regX |
| 0x05 |
SET |
immediate |
| 0x06 |
CALL |
addr |
| 0x07 |
RET |
- |
| 0x08 |
MOVR |
regX, regY |
| 0x10 |
SYS |
regX |
| Cpu Code |
Meaning |
| 0x00 |
Halt |
| 0xAA |
Protection error |
| 0xBB |
Invalid register |
| 0xCC |
Unknown opcode |
| 0xDD |
Unknown syscall |
| 0xD0-7 |
Execute syscall |
| 0xFF |
Success |
| Kernel Code |
Meaning |
| 0x00 |
exit |
| 0xA0 |
console out |