Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Oxygen Flexi Parameter Passing

  1. #11

    Re: Oxygen Flexi Parameter Passing

    Hi Zak,

    I hope the zip file below satisfies most of your questions. I will include something similar in future Oxygen releases

    Charles

    1-how to print to a console instead a msgbox?

    Set up a console using Windows kernel functions

    2-how to make the above program to a dll to be called from other programming language such as thinbasic or vb6 as an example ?

    Create functions with Aliases and `export` word. Also provide a `finish` procedure.

    3-is it possible to attach an icon to the generated exe ?

    Not yet. I have further work to do on this.

    4-is it neccessary to use terminate, the code can run without using terminate but does it have unseen function?

    "Terminate" is automatic unless the binary needs to be persistent such a DLL or a function provider in a thinBasic script. Terminate frees libraries and memory blocks used by Oxygen.

    6 Heat!

    If there was a law against cruelty to computers, this recursive fibo function would surely be illegal. It requires a huge amount of processing power and when you raise the agony to 50 I think the stack overflows.
    Attached Files Attached Files

  2. #12
    Senior Member zak's Avatar
    Join Date
    Dec 2008
    Posts
    637
    Rep Power
    83

    Re: Oxygen Flexi Parameter Passing

    thank you Charles for the explanations and the valuable and rich example.
    indeed there is a gems inside the examples.
    regarding the heat, you may set internaly a temporary limitation to the recursivity levels, until you find a solution to prevent the program from floating in the memory without ending.
    i was not aware about the heat until the "pc probe 2" utility for the asus motherboards have warned me loudly after 3 minutes of running fibonacci(60) while i am in another room.
    thanks and best wishes

  3. #13

    Re: Oxygen Flexi Parameter Passing


    Glad you like it Zak,

    I should also mention the thinBasic Oxygen dependency. The compile exe or dll can be deployed on systems without thinBasic if you include thinBasic_Oxygen.dll with the application.

    This file may be located in the same folder as the application or in a child folder called lib or in a sister folder (of the application folder) called lib.

    These are currently the fixed locations where the dll will look for its Oxygen.

    This is how the Oxygen hunt is internally implemented:
    [code=thinbasic]
    const as string hostdll=""+_
    "`.\thinBasic_oxygen.dll` : call fwd libpath : cmp eax,0 : jnz fwd ndll"+crlf+_
    "`lib\thinBasic_oxygen.dll` : call fwd libpath : cmp eax,0 : jnz fwd ndll"+crlf+_
    "`..\lib\thinBasic_Oxygen.dll` : push eax : call [ebx] : cmp eax,0 : jnz fwd ndll"+crlf+_
    "`\thinbasic\lib\thinBasic_Oxygen.dll` : push eax : call [ebx] : cmp eax,0 : jnz fwd ndll"+crlf+_
    "`c:\thinbasic\lib\thinBasic_Oxygen.dll` : push eax : call [ebx] : cmp eax,0 : jnz fwd ndll"+crlf
    [/code]

    Charles



  4. #14

    Re: Oxygen Flexi Parameter Passing

    Zak,

    Further to your question 3

    Is it possible to attach an icon to the generated exe ?

    I discovered a naughty little program called Resource Hacker which allows you to add icons to EXE files amongst other things. Very easy to use.

    www.angusj.com/resourcehacker/

    and IcoFX is good for creating icons

    http://icofx.ro/


    Charles

  5. #15
    Senior Member zak's Avatar
    Join Date
    Dec 2008
    Posts
    637
    Rep Power
    83

    Re: Oxygen Flexi Parameter Passing

    thank you Charles, i have downloaded Resource Hacker ,
    it is a very usefull utility
    then choosing Action -> Add new resource ; icon file, then save as.
    the new exe now with a new icon
    best wishes

Page 2 of 2 FirstFirst 12

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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