8000 Specification · mandriota/mabvm Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Specification

Mark Mandriota edited this page Oct 25, 2022 · 8 revisions

Memory

MabVM has linear array divided by 8*4KiB blocks and 8-byte ceils where each block has own mutex.
When some subject write to not self memory, there mutex must be locked by it.

Registers

MabVM has registers which cannot be used from code:

  • codP which points to current instruction
  • srcP which points to current source ceil of instruction.
  • dstP which points to current destination ceil of instruction.
  • Pseudo register valP which links current value of ceil pointed by srcP to ceil pointed by dstP.

Instruction Set

Mab uses byte-code, so every single instruction is represented by a single byte in memory.
For each register exist same instructions, which by the standard model increment register by k=1.
The model also can be changed by adding these flags to instruction:

  • IF which negates k: k=k*-1.
  • EF which extends k with a current value of ceil pointed by srcP and decrements srcP by 1.
  • MF which interrupts execution until mutex will be unlocked. This can be used for work with I/O or with other threads.
  • LF which executes instruction only if srcP < dstP.
  • EF which executes instruction only if srcP = dstP.
  • GF which executes instruction only if srcP > dstP.

Number of opcodes: 4(2⁶).
Number of registers: 3+1i.
Memory model: linear array.

Clone this wiki locally
0