• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

PluriBASIC - Progress March 7 2018

Started by Brian Alvarez, March 08, 2018, 03:58:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian Alvarez

 I went ahead and added an Oxigen basic compiler configuration tab. It seems to work fine.

PluriBASIC is now generating the basic if/then for/next macros and other stuff. According to the online reference, PluriBASIC seems to be generating code that can already be compiled (as soon as i find information on how to invoke the compiler DLL).


#COMPILER OXIGEN
#COMPILE EXE
#DIM ALL
#OPTIONS X64
#DATABASE CLOSED

FUNCTION PBMAIN() AS LONG

STDOUT "Hello world"

END FUNCTION


Other stuff like variable declarations should also be easy to generate. Two nights was an over estimate. I added the basics in 3 hours. Now off to sleep. :)



Brian Alvarez

Looking good.

Mike Lobanovsky

It is OxygenBasic, not Oxigen, Brian.
Mike
(3.6GHz Intel Core i5 w/ 16GB RAM, 2 x GTX 650Ti w/ 2GB VRAM, Windows 7 Ultimate Sp1)

Chris Chancellor

Hello Brian

to invoke the O2 compiler use shellexecute the  gxo2.exe  in the format below

  C:\OxygenBasicProgress >  gxo2.exe     < filename.o2bas >


or run the batch file as below  ( please change the file name from FindEd.o2bas to your own filename )


::@echo off

::Set the Oxygenbasic compiler path
set o2dir=C:\OxygenBasicProgress

::Compile
%o2dir%\gxo2.exe FindEd.o2bas


echo done
pause


Note that the C:\OxygenBasicProgress  is the folder containing the downloaded
and unzipped contents from
https://github.com/Charles-Pegge/OxygenBasic/blob/master/OxygenBasicProgress.zip

and the given file name is FindEd.o2bas  in this example
use your own filename

Brian Alvarez

Quote from: Mike Lobanovsky on April 29, 2018, 10:41:41 AM
It is OxygenBasic, not Oxigen, Brian.

Thanks mike, i will fix it. :)

In spanish and other languages its "Oxige...", thats why it is easy to mix words. :)

Brian Alvarez

#20
Quote from: Chris Chancellor on April 29, 2018, 03:12:24 PMto invoke the O2 compiler use...

Thanks chris, i will try it later today. :)

Brian Alvarez

Ok i will try it now. Should be easy to do if everything is in place.

Brian Alvarez

Charles, is there a way to omit the Messageboxes with syntax errors and instead get the message via STDIN so i can parse the line with the error and highlight it? the -m switch doesnt seem to work for that...

I would lke to be able to either do that, or make a direct call to the DLL that doesnt pop up messageboxes. Are the DLL declarations available?

James C. Fuller

Brian,
  In the tools subdirectory is exo2.bas that needs to be compiled with FreeBasic for console output.
It is attached here.
exo2 -c <filename>

James


Brian Alvarez

Quote from: James C. Fuller on April 30, 2018, 12:39:56 AM
Brian,
  In the tools subdirectory is exo2.bas that needs to be compiled with FreeBasic for console output.
It is attached here.
exo2 -c <filename>

James

Thanks James, i made a version of the Exodus file that doesnt display popup messageboxes. It now works fine and
compiles OxygenBasic applications fine too. Next step is expanding the variety of statements supported by the engine.

Yaay! :)



Charles Pegge

Hi Brian,

You can now make your own fully customised compiler, using Oxygen.dll directly. My favourite is co2, as it is written in O2. Use o2_mode 9 for oleString i/o, like PB.

Brian Alvarez


Charles Pegge

#27
These are the i/o modes specified in oxygen.bas: ( bits 1,2 and 8 )

'specify string mode for various o2 API functions
'0 ascii char*
'1 ascii char*
'2 unicode wchar*
'8 ole bstring ascii
'9 ole bstring ascii
'10 ole bstring unicode
'--------------------------------------------------
sub o2_mode alias "o2_mode" (byval m as sys) export
'==================================================
  omo=m
End Sub


Chris Chancellor

Hello Brian
long time no hear

any progress status on your project ?

Brian Alvarez

Hello Chris.

The project is pretty advanced. In fact i already use it for my own purposes. Unfortunately the market is not very profittable and i need to focus in other things.

I wish to return to daily progress on it like before but since it is taking too long to generate profit i cant afford it. Thats why i wanted Adam to purchase the project, I believe he is more able to work on it and at the same time pay the bills.

Brian. :)