L1VM - little VM

I did something cool: I developed a tiny VM core in Brackets my own programming language for my L1VM! For now it has only a few opcodes. The VM runs a little loop that counts to 10.000.000.

Here is a run on my Lenovo L340 notebook with a core i5 9th gen:

[stefan@tuxmobile l1vm-work-2021-11-26]$ time l1vm prog/little-vm -q

real	0m25,014s
user	0m24,897s
sys	0m0,013s

The little VM runs with about 400.000 additions per second.
Per one addition it runs: (L1VM assembly opcodes)
addi: 59 opcodes
lsi: 79 opcodes
jmpi: 51 opcodes
the run loop: 6 opcodes
To get a total of 195 opcodes per addition. And this results in 78.000.000 opcodes per second!!!

Here is the little VM source code: prog/little-vm.l1com

This little VM is an example how to use “jsra” and “loadl” in a program.