• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Oxygen Basic

Started by Frederick J. Harris, September 29, 2010, 10:12:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Frederick J. Harris

Hi Charles!

    What is Oxygen Basic?  I never heard of that, and just tried a search on it but didn't come up with much.  I saw you made a reference to it the other day, and it made me wonder what it is.

Charles Pegge

#1
Hi Frederick,

This is a project I have been working on for the last three years or so. It was first conceived as a minimalist machine code scripting language O which then rapidly transformed into O2. An x86 Assembler was soon built on top of this followed by a supporting macro language. Then Eros suggested more people would understand it better if it used Basic syntax. So that has taken up the larger portion of the project.

Among its characteristics is the ability to read enough C to understand most  C header expressions as well as the standard Qbasic type of declaration. and this I hope will aid easy integration the many Libraries which only provide C headers to support their deployment.

Oxygen takes the form of a smallish DLL (370k) which with a minuscule front end can be used to compile Basic source code to binary strings for direct execution in memory or to create a more conventional PE image which then saves to an EXE or DLL file.

I had success with a few 64bit "Hello World"s a few months back but other aspects have kept me busy in the mean time.

In Oxygen, you can mix Assembler and Basic with few restrictions and even write code that looks like C. The C/Basic fusion poses some interesting dilemmas like how to deal with case sensitivity and what to do at the end of a line. And above all, how should pointers be treated.

I have kept a low profile on this project so I can take it through to the Beta stage without too many distractions. But John Spikowski has generously set up a new Forum for OxygenBasic, which should be active in a few days time. I will let you know!

I use SourceForge for distributing Oxygen. (currently Alpha010a)

http://oxygenbasic.sourceforge.net

Charles


Frederick J. Harris

Thanks Charles!  I didn't realize it was a project of yours.  I was thinking another dialect of BASIC I had never heard about (not that I'm all that up on the subject, because I'm not).

Charles Pegge


There are many Basics out there but Basic compilers are relatively sparse so I thought I'd have a go. It was a great opportunity to experiment with syntax styles and see how far the rules can be stretched. As programmers we spend much of our working lives splicing bits of code together, building application that use a wide range of libraries, most of them originating from the populous C community. My aim is to get the compiler to be tolerant of a wider range of coding conventions than is usual in a single language implementation.

With the Oxygen compiler my aspiration is to be able to copy example C code directly from MSDN pages and with minimal alterations get it to run. The code can be tidied and adjusted to a more conventional Basic format later.

Charles

Charles Pegge

#4
Hi Everyone!

We now have a new website for OxygenBasic including a forum and wiki, many thanks to John Spikowski for creating the domain and setting it all up. This is all new to me.

http://www.oxygenbasic.org

If you don't mind roughing it with Alpha software then you are more than welcome to join the forum. The Oxygen download (1.5 Mb) is publically available to all, using the SourceForge link and this includes the project source code.

I know some of you here are interested in Assembly code. Oxygen now emits Opcode and Assembly code listings of a compiled program directly into the IDE (Scintilla based). when you compile with Ctrl-F7. There is also a very simple console compiler called EXO2. There is also a facility to set a view block within a program so you can limit the Asm listing to a few lines of Basic source. Simply mark the top and bottom of the section with three hashes ###

Charles.