Lemonade virtual machine

User projects written in or related to FreeBASIC.
Post Reply
Dormin
Posts: 5
Joined: Apr 24, 2020 19:10

Lemonade virtual machine

Post by Dormin »

Hello everyone!
This is my first post.
I'm trying to create a virtual machine, complete with microprocessor, virtual network, virtual video, virtual RAM and HD.
My aim is to create an open source system, where the code is written once and once compiled, it can be run on various platforms, such as Windows, Linux and android. For this purpose I'm using twinbasic, freebasic, gambas and b4a. I have a small problem between twinbasic and freebasic, I really wish I could combine the speed of freebasic, with the flexibility of twinbasic, but I can't in any way make them communicate with each other, the libraries created by one are not digestible for the other. I'd really like to ask if anyone has ever succeeded in this endeavor and even more if anyone wants to join my cause, I'm happy to share my work and I'm very inclined to criticism, advice and requests. I send you the link to my project https://github.com/IvanPausich/LemonVM
Imortis
Moderator
Posts: 1926
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: Lemonade virtual machine

Post by Imortis »

From the Twin Basic website:
Fully based on COM technologies, like the classic versions of Visual Basic
That would be your issue. FreeBASIC doesn't have any built-in way to work with COM objects. If you search around the forum, there are other people and libraries that have done it, so it is possible, its just not simple.

EDIT: Look for the library "Disphelper". It may need to be recompiled or tweaked to work in the latest FB, but it is your best bet.
Dormin
Posts: 5
Joined: Apr 24, 2020 19:10

Re: Lemonade virtual machine

Post by Dormin »

thank you for the prompt reply, now I try to search as you told me, however I continue to look for helpers and I will write my progress here
Vortex
Posts: 118
Joined: Sep 19, 2005 9:50

Re: Lemonade virtual machine

Post by Vortex »

Hi Dormin,
I have a small problem between twinbasic and freebasic, I really wish I could combine the speed of freebasic, with the flexibility of twinbasic, but I can't in any way make them communicate with each other, the libraries created by one are not digestible for the other.
FreeBASIC can output MS COFF object modules but twinBASIC does not provide any option for ths purpose. As an example, you can link together the MS COFF object files produced by FreeBASIC and MS VC.
mrminecrafttnt
Posts: 131
Joined: Feb 11, 2013 12:23

Re: Lemonade virtual machine

Post by mrminecrafttnt »

Compile Freebasic Code as DLL File and bind it into the Twinbasic

This means that the TwinBasic code is main code and the freebasic dlls have the timecritical code. Not tested but theoritical possible.
Dormin
Posts: 5
Joined: Apr 24, 2020 19:10

Re: Lemonade virtual machine

Post by Dormin »

i tried to link it, but it always gives me error, like link dll not found. I tried various methods found in the forum. i create a dll in freebasic, i put it in the twinbasic project folder, i declare the dll in the code, but nothing, it seems that twinbasic doesn't like freebasic dlls
Dormin
Posts: 5
Joined: Apr 24, 2020 19:10

Re: Lemonade virtual machine

Post by Dormin »

solved, in the simplest possible way, just insert the physical and static address to the dll. the program even if the dll was in the project folder, it needed the full path. too bad but there is no way to use app.path & "/mydll.dll" or something similar, the compiler doesn't accept it
Post Reply