thinBasic Oxygen Compiler Module
OxygenBasic is a Just-In-Time compiler assembler, deployed in a single DLL that takes source code strings and returns executable binary. It is an extension of the Oxygen assembler. This implementation can be used with thinBasic to provide high speed functions for time critical operations, that would otherwise be impractical using interpreted code alone. The compiler can also generate conventional executables and dynamic link libraries (DLL).
OxygenBasic supports Object Oriented Programming with multiple inheritance and also single inheritance modes (more suited to COM). It can also compile & execute strings of source code at run time with its built in compile() function, opening new possibilities for functional programming.
The built in function set is small. but contains the necessary tools to build class / function libraries to any scale.
OxygenBasic can interact directly with thinBasic Variables - including User-Defined Types, or it can return values using Subs and Functions like an external DLL.
In addition to understanding Basic in the QBasic genre, OxygenBasic can read sufficient C syntax to deal with most C headers directly, eliminating the need to translate them.
Since this is still alpha software, please take reasonable precautions when testing it and ensure that no vital data is exposed unsecured. There are frequent updates of OxygenBasic on this thread & occasionally some of the older examples will break with adjustments to syntax and namespace. But I will endeavour to ensure that all the examples included in thinBasic_Oxygen.zip work correctly.
Charles
Installing the latest version with thinBasic
Follow this link for the new thinBasic_Oxygen:
http://www.thinbasic.com/community/s...ad.php?t=12175
Oxygen Website and Forum
For the detached version of Oxygen; latest versions, examples and discussion. Oxygen can now compile 64 bit EXE and DLLs. Many thanks to John Spikowski for creating and sponsoring this site!
http://www.oxygenbasic.org
http://www.oxygenbasic.org/forum/
Charles
Legacy Version
The simplest way to deploy the this version of thinBasic_Oxygen.dll is to transfer it into \thinBasic\Lib overwriting the previous version.
One warning: Some examples which have become obsolete or broken have been removed but may linger in your thinBasic\SampleScripts folder from previous installations. To avoid this you can delete or rename the prior \thinBasic\SampleScripts\Oxygen folder before installing a new thinBasic Beta.
Bookmarks