PDA

View Full Version : New thinBasic_Oxygen Module



Charles Pegge
22-07-2013, 11:53
This new version is itself written in OxygenBasic and interfaces the latest generic Oxygen.dll.

It can be downloaded from here:

https://github.com/Charles-Pegge/OxygenBasic

thinBasic_Oxygen.zip contains:

Oxygen.dll
thinBasic_Oxygen.dll
thinBasicOxygen module source code
Examples (a few)
OxygenBasic Manual
Oxylog.txt


Copy both DLLs into \thinbasic\lib\

ReneMiner
22-07-2013, 13:05
great. Just played around with VarArrayPointers-sample and to make sure it's really "Bananas" I asked back like this:


If p Then MsgBox 0, Memory_Get(p, Peek(DWord, p - SizeOf(DWord)))


now- just to make sure SizeOf in oxygen only works on variables or also on types?

Charles Pegge
22-07-2013, 15:36
Yes, both types and variables.

Some attribute cases:



string s[3]={"apple","banana","melon"}


print len s[2] '6
print len s[1] '5
print sizeof s '4
print spanof s '3
print typeof s '"string"
print sizeof string '4


type udt
double d
string s
byte b[2]
end type


udt u
print sizeof udt '14
print sizeof u '14

peter
22-07-2013, 15:44
And that is how OxygenBasic works!

ReneMiner
22-07-2013, 17:09
fun example. only thing - and that's probably the same in tB - client-content vanishes when moving the window. but I'm used to place my windows in advance where I want them anyway.

I did not find out yet how to start some plain oxygen-script - seems to be impossible from scintilla - so I'll probably stay one of those who uses oxygen through thinBasic. Assembler I don't get anyway - when I was a teenager (8-bit-times) there were only those things as CMP, LDA, STA, LDX, JMP, JSR etc. but that's a long time ago - so I'm probably no machine-coder but some basic head only. I'm still waiting for Petr to test the above mentioned Example-script from new oxygen - since it uses the same thinCore-functions. Maybe there's an advantage in system-independence through oxygen so I will develop most of these functions (http://www.thinbasic.com/community/showthread.php?t=12174&p=89374#post89374) using oxgen then

What would be an equate to Poke/Memory_Set in oxygen ?

Charles Pegge
22-07-2013, 20:47
Assembler can be freely mixed with OxygenBasic statements, global/static memory, technically speaking occupies the uninitialised data section, and locals/parameters occupy the stack. All basic variables and equates can be accessed by Assembler, within the standard scoping rules.


byte b[4096]
addr ecx,b 'pseudo instruction to load variable address
mov byte [ecx+7],42
indexbase 0
print b[7]

Assembly code is not usually needed , and limits portability, so I would advise staying with Basic, unless you want to do some.

peter
22-07-2013, 22:21
and that's probably the same in tB - client-content vanishes when moving the window.

Isn't the same!

ReneMiner
23-07-2013, 06:25
no- isn't. the last examples run fine even when moving the window - so my windows are not broken- just dirty :D - since they are maintained by ms daily.

ErosOlmi
18-02-2014, 22:38
Charles,

thanks for keeping thinBasic_Oxygen always up to date.
I will publish very soon (hope next week) a new thinBasic update.

Ciao
Eros

Charles Pegge
19-02-2014, 19:03
Thanks Eros,

The old Oxygen examples need to be dumped, since many of them are out of date.

ErosOlmi
17-01-2015, 11:15
Charles,

thanks a lot for always keeping ThinBasic Oxygen module updated.

Ciao
Eros

Charles Pegge
19-01-2015, 22:30
You're welcome, Eros :)

I normally update within a few days of any changes to Oxygen.dll