Oxygen Basic

Information => Open Forum => Topic started by: Peter on December 03, 2011, 04:55:30 AM

Title: Paradise
Post by: Peter on December 03, 2011, 04:55:30 AM
Deleted
Title: Re: Paradise
Post by: Charles Pegge on December 03, 2011, 05:34:19 AM

Hi Peter,

You are right about my being over on thinBasic. I am currently reviewing the thinBasic Oxygen materials (as well as virtual White Clouds).

We are also due for Alpha38, featuring 64 bit compiling, since my most complex example now works as a 64bit binary and I am reasonably confident of its stability.

Charles
Title: Re: Paradise
Post by: erosolmi on December 03, 2011, 01:11:47 PM
Not because thinBasic is mentioned in your post but hey: there is other than just one single thing.

Charles has evolved his compiler like no-one in the world has never done. Give him a rest some time.

Instead: if you want to help Oxygen project, spread the word about it.
Title: Re: Paradise
Post by: JRS on December 03, 2011, 01:40:36 PM
Quote
Instead: if you want to help Oxygen project, spread the word about it.

And don't forget to mention O2 does 64 bit now.

@Eros - WELCOME!
Title: Re: Paradise
Post by: efgee on December 03, 2011, 03:07:22 PM
... since my most complex example now works as a 64bit binary and I am reasonably confident of its stability.

With the exception that 64bit classes still don't seem to work right:
In 32 bit the code compiles, in 64 it doesn't...
(just swapped RTL32 with RTL64)

There is only one inc file that has 161 lines and on that line is the statement "end class".

Error messages are still a mystery to me  :(
Title: Re: Paradise
Post by: Charles Pegge on December 03, 2011, 03:14:20 PM
Can you show me your code please Frank.

64 bit OOP is working here.

PS: I have just posted the latest Oxygen-in-Progress
Title: Re: Paradise
Post by: Charles Pegge on December 03, 2011, 03:17:36 PM

Welcome to the forum Eros!  :)
Title: Re: Paradise
Post by: efgee on December 03, 2011, 05:42:50 PM
After investing more time:
found out that the culprit was a method with the name "Quit()".
If the name is changed to "Quitter()" it works.

 >:(

Title: Re: Paradise
Post by: JRS on December 03, 2011, 07:43:55 PM
Frank,

Didn't Charles mention that this is the free trial version of the 64 bit compiler? If you want unrestricted methods (and other unmentioned bugs fixed) you will have to buy Charles a beer.  ;D
Title: Re: Paradise
Post by: Charles Pegge on December 03, 2011, 08:01:14 PM
It sounds like a side-effect of something else. If your o2 version is earlier than 1 December...

The new Oxygen error messages should tell you which include file. This info is now carried through to the assembler.

No beer necessary. Perhaps a small brandy for yourself :)
Title: Re: Paradise
Post by: efgee on December 03, 2011, 09:11:35 PM
I tried with the newest Oxygen and the bug still remains; and I agree it seems to be a side effect...

BTW: If it's OK with you: I'm ready for a Jack Daniels now ;D

Title: Re: Paradise
Post by: Charles Pegge on December 03, 2011, 09:51:02 PM
If you want me to look at it privately, then send it zipped to cevpegge at oxygenbasic.org.

I try to cover all possibilities but it may be some kind of misread on the 64 bit side.

Charles
Title: Re: Paradise
Post by: efgee on December 03, 2011, 09:51:51 PM
No need for that, found it:

Code: [Select]
$FileName "test.exe"

includepath "..\inc\"
'include "RTL32.inc"
include "RTL64.inc"
include "MinWin.inc"

function Quit()
    PostQuitMessage(0)
end function

class TEST
    method constructor()
    end method

    method destructor()
    end method

    method Quit()
        PostQuitMessage( 0 )
    end method
end class
' =====
' ENTRY
' =====
new TEST app
del app

There is a function with the same name as a method inside a class.

With RTL32 it compiles, with RTL64 it doesn't... but it should.

Didn't think a good old Jack would help that good  ;D
Title: Re: Paradise
Post by: Charles Pegge on December 03, 2011, 10:09:41 PM

Okay, I'll look into that, Frank. Now for my next sleep :)
Title: Re: Paradise
Post by: Charles Pegge on December 04, 2011, 07:36:02 AM
Yes definitely. My favorite instruction is lea rip rax,label

In Oxygen this puts the absolute address of a label into the rax register.

I have posted another update fixing Frank's problem and a couple of others related to string <-> val conversions

Also adjustments to Windo.h:
GetAsyncKeyState(key) and 0x8001
As per MSDN spec.

Charles
Title: Re: Paradise
Post by: JRS on December 04, 2011, 12:26:31 PM
Charles,

How would you rate your migration to 64 bit.

A. Much easier then I thought.

B. About what I expected.

C. I feel bruised after taking an ass kicking from the Windows 64 bit API.
Title: Re: Paradise
Post by: Charles Pegge on December 04, 2011, 01:16:06 PM

I'd go for B. It took a long time to grasp the finer details, the descriptions available are not totally explicit. But once understood it was quite easy to build and test in stages.

However, I strongly feel the calling conventions are poor for high level languages, and this applies to both the Windows and Linux standards. We would have been better off staying with stdcall and cdecl, and it would have made compiler/OS migration so much easier.

Charles