Author Topic: PluriBASIC - Progress March 7 2018  (Read 15871 times)

0 Members and 1 Guest are viewing this topic.

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 171
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress March 7 2018
« Reply #15 on: April 29, 2018, 08:07:22 AM »
 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).


Code: [Select]
#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. :)



Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 171
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress March 7 2018
« Reply #16 on: April 29, 2018, 08:13:00 AM »
Looking good.

Offline Mike Lobanovsky

  • Jr. Member
  • **
  • Posts: 92
  • User-Rate: +1/-1
  • Gender: Male
Re: PluriBASIC - Progress March 7 2018
« Reply #17 on: April 29, 2018, 10:41:41 AM »
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)

Offline Chris Chancellor

  • Sr. Member
  • ****
  • Posts: 349
  • User-Rate: +0/-0
Re: PluriBASIC - Progress March 7 2018
« Reply #18 on: April 29, 2018, 03:12:24 PM »
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 )

Code: [Select]
::@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

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 171
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress March 7 2018
« Reply #19 on: April 29, 2018, 07:43:52 PM »
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. :)

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 171
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress March 7 2018
« Reply #20 on: April 29, 2018, 08:18:06 PM »
to invoke the O2 compiler use...

 Thanks chris, i will try it later today. :)
« Last Edit: April 29, 2018, 09:02:59 PM by Brian Alvarez »

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 171
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress March 7 2018
« Reply #21 on: April 29, 2018, 11:56:00 PM »
Ok i will try it now. Should be easy to do if everything is in place.

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 171
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress March 7 2018
« Reply #22 on: April 30, 2018, 12:01:14 AM »
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?

Offline James C. Fuller

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 599
  • User-Rate: +11/-8
Re: PluriBASIC - Progress March 7 2018
« Reply #23 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


Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 171
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress March 7 2018
« Reply #24 on: April 30, 2018, 03:07:47 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! :)

 

Offline Charles Pegge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 894
  • User-Rate: +33/-1
    • Charles Pegge
Re: PluriBASIC - Progress March 7 2018
« Reply #25 on: April 30, 2018, 07:58:19 AM »
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.

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 171
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress March 7 2018
« Reply #26 on: April 30, 2018, 08:19:08 AM »

Mode 9, got it.

What is mode 0 for?

Offline Charles Pegge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 894
  • User-Rate: +33/-1
    • Charles Pegge
Re: PluriBASIC - Progress March 7 2018
« Reply #27 on: April 30, 2018, 12:38:42 PM »
These are the i/o modes specified in oxygen.bas: ( bits 1,2 and 8 )
Code: [Select]
'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
« Last Edit: April 30, 2018, 12:40:53 PM by Charles Pegge »

Offline Chris Chancellor

  • Sr. Member
  • ****
  • Posts: 349
  • User-Rate: +0/-0
Re: PluriBASIC - Progress March 7 2018
« Reply #28 on: September 09, 2018, 03:03:02 PM »
Hello Brian
long time no hear

any progress status on your project ?

Offline Brian Alvarez

  • Moderator
  • Full Member
  • *****
  • Posts: 171
  • User-Rate: +0/-0
    • PluriBASIC
Re: PluriBASIC - Progress March 7 2018
« Reply #29 on: September 10, 2018, 09:57:41 AM »
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. :)