Oxygen Basic

Information => Introducing Oxygen => Topic started by: Charles Pegge on October 01, 2010, 04:46:39 AM

Title: Making Oxygen
Post by: Charles Pegge on October 01, 2010, 04:46:39 AM

HOW TO COMPILE:

Oxygen currently compiles with FreeBasic 0.20b (for MS Windows)

The source code and compiling batch file are included in the source folder.



This compels the GNU linker to use DllMain as the entry point

fbc thinBasic_Oxygen.bas -dll -Wl -e,_DllMain

(previous method)
fbc -dylib thinBasic_Oxygen.bas
Title: Re: Making Oxygen
Post by: Aurel on April 21, 2013, 04:59:14 AM
Charles..
I never try compile oxygen before from source and I want to try.
Which version of FB you use for latest Oxygen?
Title: Re: Making Oxygen
Post by: Charles Pegge on April 21, 2013, 07:08:44 AM
Hi Aurel,

I'm using FreeBasic 0.24.

0.21 and above should work
Title: Re: Making Oxygen
Post by: Aurel on September 13, 2013, 03:10:54 AM
Charles...
I was really thinking about creating my fork of Oxygen.
So i need FreeBasic from 0.21 to 0.24 v.
Is there anything specific what i maybe miss ?
Title: Re: Making Oxygen
Post by: Charles Pegge on September 13, 2013, 04:44:19 AM
Should be fine. I have not tried anything more recent than 0.24 yet.

Compiling:

fbc -dll Oxygen.bas
Title: Re: Making Oxygen
Post by: Aurel on September 13, 2013, 04:48:15 AM
Thanks... ;)
Title: Re: Making Oxygen
Post by: ehitam on September 16, 2013, 04:52:20 PM
I think you should consider using latest FreeBASIC with c emitter, would give faster build then normal FreeBASIC compilation.
Title: Re: Making Oxygen
Post by: JRS on September 16, 2013, 05:48:41 PM
Yes. I agree. Aurel would fit in great with those guys.

Title: Re: Making Oxygen
Post by: Charles Pegge on September 16, 2013, 07:07:48 PM
I'll see how the new C-emitting FB works with Oxygen. It should aid building on different platforms, subject to rewriting inline-assembler sections.

PS:

No problems encountered when compiling Oxygen with FreeBasic version 0.91 in the default (GAS) mode
Title: Re: Making Oxygen
Post by: JRS on September 16, 2013, 07:29:17 PM
My only fear is that it may be too nasty to look at in that form.

Title: Re: Making Oxygen
Post by: Charles Pegge on September 16, 2013, 07:44:07 PM
No, the emitted C code is not for humans, but probably no worse than the GAS emissions :)
Title: Re: Making Oxygen
Post by: JRS on September 16, 2013, 08:11:09 PM
It's easy to forget that O2 is a compiler not a translator.

Have you looked at Daniel's uCalc Transformer as a possible way for O2 users to port their code to C?
Title: Re: Making Oxygen
Post by: Aurel on September 16, 2013, 09:09:07 PM
I'm not interested for c emiter and i will use 0.24.

By the way i see this ucalc transformer and idea is not bad BUT
what you can translate,if you translate PB code to C which contain win api function
your C code will only work on windows,right?
Title: Re: Making Oxygen
Post by: JRS on September 16, 2013, 10:03:45 PM
The uCalc Transformer can translate anything to anything else. Daniel's project is to try and give the PB folks a migration path and still allow them to feel at home using PB syntax. Patrice has also provided a library of C++ functions emulating PowerBASIC syntax.

Title: Re: Making Oxygen
Post by: kryton9 on September 16, 2013, 10:22:07 PM
John, AllBasic site was what came up when I searched for uCalc Transformer.  Looks interesting.

Here is a thought, can't we output existing oxygen to c++ and then use c++ to develop oxygen for the future?
Title: Re: Making Oxygen
Post by: Charles Pegge on September 18, 2013, 01:18:10 PM
From FB, I think it will have to be manually coded ,as Patrice did with his PB-based libraries. An automated translation would cause too many cryptic bugs.

The trivial stuff like curly braces and semicolons could be automated quite easily though.
Title: Re: Making Oxygen
Post by: JRS on September 18, 2013, 01:34:54 PM
I think the smart way is to use Daniel's tool to convert BaCon to C. You have a working model to use as a guide. That could then be the gold standard for a traditional BASIC to ANSI/C tranlator. Variations could be derived from that. The biggest obstacle I see is a efficient memory/string manager. Is multi-threading a feature that should be considered for a BASIC to C translator?  

Trying to convert the O2 compiler to C++ is unrealistic IMHO.