-
Notifications
You must be signed in to change notification settings - Fork 1
Specification
Mark Mandriota edited this page Oct 25, 2022
·
8 revisions
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.
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.
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 negatesk
:k=k*-1
. -
EF
which extendsk
with a current value of ceil pointed bysrcP
and decrementssrcP
by1
. -
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 ifsrcP < dstP
. -
EF
which executes instruction only ifsrcP = dstP
. -
GF
which executes instruction only ifsrcP > dstP
.
Number of opcodes: 4(2⁶)
.
Number of registers: 3+1i
.
Memory model: linear array
.