Poll

What is your language preference to build Oxygen Basic?

Oxygen Basic
2 (40%)
C/C++/ANSI C
1 (20%)
Assembler
0 (0%)
BCX
2 (40%)
FreeBASIC
0 (0%)
Other
0 (0%)

Total Members Voted: 0

Author Topic: Alternative O2 Builder  (Read 14932 times)

cevpegge

  • Guest
Re: Alternative O2 Builder
« Reply #15 on: September 28, 2010, 07:37:14 AM »

The dark areas of C, for me are linking libraries and building packages. There are some unfamiliar mumbojumbo invocations involved, but the language will port fairly cleanly, once the necessary string support functions are in place.

Charles

jcfuller

  • Guest
Re: Alternative O2 Builder
« Reply #16 on: September 28, 2010, 08:03:36 AM »
Charles,
  With your assembler expertise I would recommend giving JWasm a look-see. No stupid {};crap!!

James

cevpegge

  • Guest
Re: Alternative O2 Builder
« Reply #17 on: September 28, 2010, 09:09:40 AM »

Thanks James,

I'm just looking at what's avaiable now, but I think the curly braces and the semicolons have us in an inescapable grip.

The Pelles C compiler looks attractive and coding to the C99 standard should ensure good portability. I can keep library dependency down to a minimum.

Charles

efgee

  • Guest
Re: Alternative O2 Builder
« Reply #18 on: September 28, 2010, 10:35:48 AM »
Pelles C restricts OxygenBasic to Windows, but on the other side there is a ARM version too (WinCE).

---

When I fumble around with C I find myself battling compiler issues rather than language issues.

Everybody talks about how portable C is... well the language itself is, but the compilers are not.

If one keeps the code clean from compiler specific nonsense then code can be ported to different compilers/OS.

---

Charles, have you looked into tcc?
It has Windows/Linux/32bit/64bit/ARM on a small footprint.

Take care
efgee
« Last Edit: September 28, 2010, 10:38:10 AM by efgee »

jcfuller

  • Guest
Re: Alternative O2 Builder
« Reply #19 on: September 28, 2010, 10:40:19 AM »
efgee,
  I agree and that's why I adopted to go with MinGwTD for use with Bcx on Windows. It's the closest to the Linux versions.

http://tdm-gcc.tdragon.net/

James
 

cevpegge

  • Guest
Re: Alternative O2 Builder
« Reply #20 on: September 28, 2010, 01:37:47 PM »

The main problem with these is the inline-Assembler facilities. TCC demands the use of AT&T notation and although GCC will accept Intel notation, the examples I saw were very clumpy - each instruction had to be quoted and end with \n.

This is worrying:
http://www.reversing.be/article.php?story=20051203194931893

Pelles has it absolutely right and supports ARM Assembly code as well. It is all neatly contained between curly braces without extraneous syntax.

But I have not ruled out Oxygen self-compilation if C presents too many obstacles :)

Charles

jcfuller

  • Guest
Re: Alternative O2 Builder
« Reply #21 on: September 28, 2010, 03:14:56 PM »
Charles,
  I had forgotten how ugly intel gcc asm is. Just bite the bullet and go with JWasm. With all the high level syntax and the superb macro facilities it's very basic - like. There is even a masmbasic which is just macros. JWasm is 100% compatible with Masm. It's closer to basic that "c" will ever be.

No Linux if you go with Pelles.

James

JRS

  • Guest
Re: Alternative O2 Builder
« Reply #22 on: September 28, 2010, 03:52:08 PM »
Quote
But I have not ruled out Oxygen self-compilation if C presents too many obstacles ...

You would be in control of your destiny and your code with a potential of establishing new standards in Basic.

SB is only an interpreter but the ANSI C route Peter Verhas chose from the beginning has held up for over 10 years with no obsolescence in sight for the near future.

It might be worth porting your FreeBASIC code to BCX and tweak the C after the translation if needed. Nothing ugly about BCX ASM inclusion. This is the fastest way out the FreeBASIC door.

It would be great if Armando and James could help Charles out with a port of O2 to BCX.
« Last Edit: September 28, 2010, 04:20:07 PM by JRS »

jcfuller

  • Guest
Re: Alternative O2 Builder
« Reply #23 on: September 28, 2010, 05:04:28 PM »
Quote
But I have not ruled out Oxygen self-compilation if C presents too many obstacles ...


 Nothing ugly about BCX ASM inclusion.



John,
  I use g++ with Bcx and it needs g++ asm -> UGLY
The help file I believe shows asm if code is compiled with Pelles.

James

JRS

  • Guest
Re: Alternative O2 Builder
« Reply #24 on: September 28, 2010, 05:11:24 PM »
Quote
The help file I believe shows asm if code is compiled with Pelles.

Okay, now I'm on the same page.

efgee

  • Guest
Re: Alternative O2 Builder
« Reply #25 on: September 28, 2010, 06:48:09 PM »
I actually don't see the hurry to leave FreeBasic at all. It served Charles well and it can do so for years to come.

On the other hand Oxygen self-compilation would be a very good move, as you could see for yourself how solid the compiler is  ;D

efgee

JRS

  • Guest
Re: Alternative O2 Builder
« Reply #26 on: September 28, 2010, 08:26:53 PM »
I added a Poll to the thread asking the question ...  (see top of page to vote)

What is your language preference to build OxygenBasic?

efgee

  • Guest
Re: Alternative O2 Builder
« Reply #27 on: September 28, 2010, 08:43:16 PM »
I added a Poll to the thread asking the question ...  (see top of page to vote)

What is your language preference to build OxygenBasic?

But in the end it's his baby - his choice.
« Last Edit: September 28, 2010, 08:49:06 PM by efgee »

JRS

  • Guest
Re: Alternative O2 Builder
« Reply #28 on: September 28, 2010, 11:09:32 PM »
True but OxygenBasic is the ASM code that makes the Basic what it is. FreeBASIC is a shell and support framework to generate an executable.

I don't think Charles would mind hearing from the troops what weapon of choice is preferred.

JRS

  • Guest
Re: Alternative O2 Builder
« Reply #29 on: September 29, 2010, 01:39:46 AM »
Does Oxygen Basic generate an assembly source which is compile by the GAS assembler?

If this is true, just about anything could be used to do what FreeBASIC provides. It sounds to me that string support is the holy grail that keeps Charles from letting go of his comfortable environment. Reminds me of the PowerBASIC author that was generating 32 bit code with a 16 bit compiler.
« Last Edit: September 29, 2010, 09:23:07 AM by JRS »