Page 1 of 1
VM - Virtual machine in Purebasic?
Posted: Tue Jul 05, 2022 5:01 pm
by ricardo
Hi,
I used VM in the past to protect code and it works well (Code Virtualizer).
Now i found that someone could creatre something like a VM in Purebasic. Has anybody tried this before?
250 lines of code says in this article
https://www.jmeiners.com/lc3-vm/
Thanks in advance
Re: VM - Virtual machine in Purebasic?
Posted: Tue Jul 05, 2022 6:35 pm
by infratec
You can port this easily, but ...
What do you want with a LC3 'computer'

Re: VM - Virtual machine in Purebasic?
Posted: Wed Jul 06, 2022 3:32 pm
by ricardo
infratec wrote: Tue Jul 05, 2022 6:35 pm
You can port this easily, but ...
What do you want with a LC3 'computer'
To virtualize like Code Virtualizer that makes difficult to crack the software.
Re: VM - Virtual machine in Purebasic?
Posted: Wed Jul 06, 2022 4:08 pm
by infratec
I think if you write the code in LC3 assembler it is 'unhackable'
Is there a C compiler for LC3 ?
Else you have to write all your code in assembler

Re: VM - Virtual machine in Purebasic?
Posted: Wed Jul 06, 2022 5:22 pm
by ricardo
No, but i dont know assambler.
Its not possible to code a VM in PB and use it in my program to make it difficult to crack?
Re: VM - Virtual machine in Purebasic?
Posted: Wed Jul 06, 2022 9:34 pm
by Caronte3D
You can use the free tool "Enigma VirtualBox"
https://enigmaprotector.com/en/aboutvb.html
Or better "Enigma Protector" (commercial) if you really need a real protection system
I have used both and they work great.
Re: VM - Virtual machine in Purebasic?
Posted: Thu Jul 07, 2022 4:13 am
by ricardo
Thanks, but it looks like it can be done within PB.
Anybody can help with this?
Re: VM - Virtual machine in Purebasic?
Posted: Thu Jul 07, 2022 5:01 pm
by fsw
There is a
comprehensive tutorial on the German PureBasic site:
Tutorial in German
Discussion in German
Code of scanner, parser, assembler, virtual machine.
The code is fairly old (2013), so you would have to adapt it to the newest PureBasic version.
But at least you get the idea...