Osiris/Set:Standard
This crate provides an instruction set for a virtual machine built with pieces from crates osiris-data and osiris-process.
An exemple implementation in my forge.
Warning
Before v1.0.0, the API may change a lot :
- The set is incomplete. A lot is planed, but more is to be defined,
- Operations will be added,
- Arguments scheme may change,
- Operations could be moved or removed.
Operations
0x0000noop
Flow control
0x0101jump:address0x0102call:address0x0103return0x0104gotodirect:320x0105gosubdirect:320x0108loop:counter_init0x0109nextdirect:320x010Agoto-if:CMPdirect:320x010Bgosub-if:CMPdirect:320x010Cgoto-check:checkeddirect:320x010Dgosub-check:checkeddirect:320x010Eskip-if:CMP0x010Fskip-check:checked0x01FFhalt
Registers control
0x0201set-top:targettop:320x0202set-bottom:targetbottom:320x0203clear-range0x0204move-to-float:floatunsigned:160x0205move-from-float:unsignedfloat:160x0210push:unsigned0x0211pop:unsigned0x0220get-compare:target
Memory control
0x0301store-words:target[start:end]0x0302load-words:target[start:end]0x0303get-memory-size:target0x0304store-floats:target[start:end]0x0305load-floats:target[start:end]
Logic operations
0x0400is:CMPtarget:16:compare:160x0401not:target0:origin:160x0402or:target[start:end]0x0403and:target[start:end]0x0404xor:target[start:end]0x0405nor:target[start:end]0x0406nand:target[start:end]0x0407nxor:target[start:end]
Unsigned-integral arithmetic
0x1001sum-unsigned:target[start:end]0x1002product-unsigned:target[start:end]0x1003difference-unsigned:target[start:end]0x1004quotient-unsigned:target[start:end]0x100Fcompare-unsignedr1:16:r2:16
License
- Copyright (c) 2024 Sébastien Geldreich
- License MIT