-
Oxygen module
Charles,
I see you constantly updating Oxygen sources in http://community.thinbasic.com/index.php?topic=2115.0 (a big thanks for that) but compiled module in http://community.thinbasic.com/index.php?topic=1845.0 is still the version compiled on 2nd of October.
Is it ok? I asked just for understanding how to behave when I release a new thinBasic version.
Ciao
Eros
-
Re: Oxygen module
Hi Eros,
The October version is the stable one with the assembler but without Basic. As soon as I have a stable O2H, it will replace the October version. I will probably add an extra 100k to the DLL for the Basic. I think it is best to maintain it as a single project.
Here is the first operational code - but I have loads of testing and corrections to do yet. :)
[code=thinbasic]
uses "OXYGEN"
uses "FILE"
dim v1,v2,v3,v4,v5 as long
dim p0,p1,p2,p3,p4 as long
dim src as string
src="
o2h
function fun1( byval v1 as long,byval v2 as long) at #p1
static c,d=29 as long
local a=2,b=42 as long
function=v1+v2*4
end function
function o2_release() as long at #p0
terminate
end function
"
o2_asmo src
v1=o2_exec
declare sub o2_release () at p0
declare function fun1 (byval v1 as long, byval v2 as long ) as long at p1
v2=fun1(3,4)
o2_release()
msgbox 0,v2
msgbox 0,"length "+o2_len+$cr+o2_error+$cr+o2_prep(src) : stop
file_save ("t.txt",o2_error+o2_prep(src)) : stop
o2_asmo src : o2_exec : msgbox 0,"0x"+hex$(vv)
[/code]
-
Re: Oxygen module
wow, great :o
Now I've got how you update.
Thanks a lot.
Eros
-
Re: Oxygen module
Hi Charles,
that looks very good, nice to see the interface is the same as for "classic" oxygen assembly.
Does the o2h on the beginning tell module it contains o2h code?
Petr
-
Re: Oxygen module
Yes Petr, it adds Basic to the Oxygen namespace. We could make it automatic but this risks breaking code written in pure Assembler which may already use some of the keywords. But I have not come to a firm decision yet.