Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dzonerzy/dvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python VM - DVM

Python VM with simple custom assembly code

This is just an experimental project, based on a custom VM implementation with some "standard" opcodes, many things are still not implemented so, if you want to add your custom opcode add it to core/opcodes.py and then implement it in core/vcpu.py.

Feel free to contribute :)

#Output

dzonerzy:dvm dzonerzy$ python dvm.py
DANIELONE

Stats:
[+] vCPU instructions: 3890
[+] VM loops: 879
[+] VM exec instructions: 60
[+] Exec time: 0.00928592681885 secs

#Compiler Simple program with loop

CSTRSP abcdefgh
DECSP 9
:1
CB 0
SSU :2
INCBSP 1
INCSP 1
SD :1
:2
DECSP 8
SSP
EXT

Result

dzonerzy:dvm dzonerzy$ python compile.py
bcdefghi
dzonerzy:dvm dzonerzy$

#dzonerzy

About

Python VM with simple custom assembly code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages