Crates.io | osiris-set-std |
lib.rs | osiris-set-std |
version | 0.1.17 |
source | src |
created_at | 2024-04-13 23:58:14.173162 |
updated_at | 2024-04-21 00:28:40.096079 |
description | A standard operation set. |
homepage | |
repository | https://asgard.trehinos.eu/osiris/set-std |
max_upload_size | |
id | 1207916 |
size | 61,222 |
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.
Before v1.0.0, the API may change a lot :
0x0000
noop0x0101
jump:address
0x0102
call:address
0x0103
return0x0104
goto direct:32
0x0105
gosub direct:32
0x0108
loop:counter_init
0x0109
next direct:32
0x010A
goto-if:CMP
direct:32
0x010B
gosub-if:CMP
direct:32
0x010C
goto-check:checked
direct:32
0x010D
gosub-check:checked
direct:32
0x010E
skip-if:CMP
0x010F
skip-check:checked
0x01FF
halt0x0201
set-top:target
top:32
0x0202
set-bottom:target
bottom:32
0x0203
clear-range0x0204
move-to-float:float
unsigned:16
0x0205
move-from-float:unsigned
float:16
0x0210
push:unsigned
0x0211
pop:unsigned
0x0220
get-compare:target
0x0301
store-words:target
[start:end]
0x0302
load-words:target
[start:end]
0x0303
get-memory-size:target
0x0304
store-floats:target
[start:end]
0x0305
load-floats:target
[start:end]
0x0400
is:CMP
target:16
:compare:16
0x0401
not:target
0:origin:16
0x0402
or:target
[start:end]
0x0403
and:target
[start:end]
0x0404
xor:target
[start:end]
0x0405
nor:target
[start:end]
0x0406
nand:target
[start:end]
0x0407
nxor:target
[start:end]
0x1001
sum-unsigned:target
[start:end]
0x1002
product-unsigned:target
[start:end]
0x1003
difference-unsigned:target
[start:end]
0x1004
quotient-unsigned:target
[start:end]
0x100F
compare-unsigned r1:16
:r2:16