Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

[OPEN SOURCE] DexVEG - Bytecode virtual machine

Google code project: http://code.google.com/p/dexveg/
License: GNU LGPL

Now I'm releasing this project as open source.
Source is available from google code SVN repository.
Binary releases will be released on google code too.


Features
- Functions

- External functions (functions defined in .NET host can be called by executing bytecode)

- External function libraries/classes (you can derive a .NET class from IVMLibrary to easily create collection of functions to be provided for bytecode)

- Possible to call bytecode functions from host .NET program ( = bytecode can be used to script functionality for host)

- NEW: Bytecode includes/libraries: include another compiled bytecode file and use functions it provides (like DLLs)
- Local variables

- File information (name, author, version, hash) Note: compiler doesnt support adding that information yet, it currently just adds default

- Wide range of operations/opcodes:
Math opcodes
Stack load ( (U)Int8, 16, 32, 64, Float, String)
Conditional jumps
Arrays
Local variables
etc.

Coming

- Just-in-time compiler (compiler bytecode to MSIL code on runtime for speed)

- Open source assembler/compiler (current one sucks, code is messy)

- Array data initializers (currently array data is initially null but in future its possible to define static initial data for array)

- More advanced security and general settings for VM (you can define what bytecode is allowed to do)

looks like a nice project u got there but just 1 question... I see in the program.cs at line 23
dv.LoadImageFromByteArray(File.ReadAllBytes(@"..\..\..\..\DexCS\DexCS\bin\Debug\test.txt.dve"));

how can we make some .dve file to execute ?
and how to even use that thing to like coding in it or something
Or u gotta upload that yet anyways goodluck 🤝
Yeah I'm going to upload the assembler/compiler but first I need to make the code more clean, because its really a mess.
Thanks for replying :P
Very nice. Can't wait until you have done a bit more work on it :)
Also what svn client do you use to upload to google?
Lol, your_byte_code->msil_byte_code->native assembly

Gonna be slow as shit i can tell you that much. Only application to this project is for educational purposes, which is probably why you are doing it, so good job :)

BTW, this project might get confused with http://www.dalvikvm.com/ because both are a virtual machine, and DalivkVM uses the .dex extension, even though your vm works alot different.
Its faster to EXECUTE dynamically generated MSIL method than to interpret the bytecode in loop.
Disadvantage is that it takes time to generate the MSIL method and therefore JIT compiling to MSIL can actually degrade performance with small and fast executing bytecode functions.

And yes, you are right this project is mainly for educational purposes. Thanks for comment :P


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Java] by JewishMindControlJul 18, 2024 02:31 PM 1 888 Jul 18, 2024 02:31 PM
Last Post: cheesingg
[Java] by WallahiMay 15, 2022 12:25 PM 3 220 May 15, 2022 12:25 PM
Last Post: GenericSkid
[C#] by alizer0Jul 23, 2021 10:47 AM 2 422 Jul 23, 2021 10:47 AM
Last Post: tux1