Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Oxygen Compiler Compiler

  1. #1

    Oxygen Compiler Compiler

    This kit (zip attached) generates a simple console compiler for Oxygen, called co2

    It contains all the necessary components and instructions to do this, in a minimalist sort of way.

    Applications compiled in Oxygen require either thinBasic_Oxygen.dll or Oxygen.dll to be included in the same folder as the executable.

    To demonstrate an application, I have produced a compiled version of the AllBasic WordCount Code Challenge:
    to run this you will also need a copy of bible.txt. - Being precompiled It takes only 0.176 Seconds to do the task.

    http://www.allbasic.info/forum/index...ic=683.new#new



    Attached Files Attached Files

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: Oxygen Compiler Compiler

    That is excellent Charles, standalone compiler in less than 1/4 MB
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3

    Re: Oxygen Compiler Compiler


    Hi Petr,

    Bytes are strictly rationed I am always looking for ways to eliminate redundant code as it usually improves the program. I hope we will be able to maintain the small footprint for lightweight distribution of applications.

    Charles

  4. #4
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Oxygen Compiler Compiler

    Charles, ran find under Windows 7 - 64 bit, to let you know.

    I guess the simple way to think about what it does, as it gets confusing with the correct terminology to dummies like me. You can take your source code written in oxygen syntax and from the console make an executable from it. This executable will require the thinBasic_Oxygen.dll file with it to run elsewhere. Will it also work on combination thinBasic/Oxygen source code as it does when you use the src="oxygen source code here" within a thinBasic source file?
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  5. #5

    Re: Oxygen Compiler Compiler

    And I thought it was a Compiler compiler, a toolset to create compilers. There that term is being used in the past.

  6. #6

    Re: Oxygen Compiler Compiler

    Kent,

    Thanks for testing - glad to know it works in such a different environment. The programs you run directly in TB can also be compiled from TB or compiled with CO2 independently providing there are no thinBasic dependencies.

    Michael,

    Yes I thought that might be the case. My notion of a compiler compiler is cheating somewhat but it is possible to add new functionality to CO2 - like language extensions and feed them to the underlying oxygen compiler - so in that sense you could regard it as a potential tool set.

    Charles

  7. #7

    Re: Oxygen Compiler Compiler

    Hello Charles,
    I downloaded thinbasic (1.8.6.0), the newest oxygen and co2 and compiled co2maker and the test program that shows the messagebox.

    Every thing compiles fine if I exchange the oxygen dll from tb1.8.6 with the newest one from 8-14-2010 (otherwise the compiled co2 exe is invalid) but the message box doesn't show up.

    Is co2 not working with the newest version of thinbasic/oxygen?

    Thanks in advance
    efgee

  8. #8

    Re: Oxygen Compiler Compiler

    Hi efgee
    for me everything works okay, in this thead :
    http://community.thinbasic.com/index.php?topic=3578.0
    there is a discusions about your problem regarding running co2 in winxp, and it is solved.
    just download the new oxygen from here:
    http://community.thinbasic.com/index.php?topic=2517
    replace the thinbasic\lib\thinBasic_Oxygen.dll with the new one, then in the new downloaded oxygen folder:
    \Examples\DLLandEXE\ConsoleCompilerMaker :
    double click on co2_maker.tbasic file so it will make co2.exe now either you write from console co2 HelloWin1.bas or double click Compile_HelloWin1.bat which contains just the line co2 HelloWin1.bas
    and the new file HelloWin1.exe will appear, double click it and it will show Hello World window.

  9. #9

    Re: Oxygen Compiler Compiler

    Hello Zak,
    thank you for your reply.

    Actually what you told me to do I had already done, but your response showed me that I have to look elsewhere, so I did.

    I compared the 3kb test.exe (the one that worked fine; from tb1.8.0) with the new 2.5kb test.exe (the one that didn't show the msgbox and found out that the new exe needs oxygen.dll and not thinbasic_oxygen.dll.

    Copied the thinbasic_oxygen.dll into my examples directory and renamed it to oxygen.dll.

    All works fine now as the messagebox is shown.

    Thanks again.
    efgee

  10. #10
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Oxygen Compiler Compiler

    The problem (or the beauty ) is that Charles updates Oxygen almost at daily basis so I cannot update thinBasic version every day or so

    Every time I release an updated thinBasic version (official or beta) I always include latest Oxygen module available.
    After that you have to follow Charles updates at the mentioned link:
    http://community.thinbasic.com/index.php?topic=2517
    Check the bottom of that post and check "Last Edit ..." date indication to see if Charles has updated it recently.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

Page 1 of 2 12 LastLast

Similar Threads

  1. Oxygen Compiler Downloads
    By Charles Pegge in forum O2h Compiler
    Replies: 2
    Last Post: 18-03-2009, 14:59

Members who have read this thread: 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •