Oxygen Basic
Programming => Tools => Topic started by: Aurel on March 22, 2011, 03:43:14 PM
-
FYS
-
Hi Aurel,
Your Editor works good here!
My sources have the extension *.bas
The Editor doesn't find this.
If I press the [SAVE] Button, there isn't any automatic storage?
-
Thanks Aurel, nice to have the tab feature!!
-
Hi Aurel,
Very neat editor!
There are no restrictions on source filenames. I like to use o2bas to distinguish it from other basic source code. Then it is possible to tell MS to run o2bas files with gxo2.exe (in the main folder). I hardly ever compile them to EXE files, but run direct from source. (double clicking their icons).
Do you have a config file to go with the editor
Many thanks.
Charles
-
Hi Aurel,
???
An open file shows extensions jumble.
Why haven't you sorted it ? ???
Are you planning to do it?
Example:
a.bas
b.bas
c.bas
o.exe
p.exe
m.chs
n.chs
and so on.
-
Hi, Aurel
I'm not confused, I'm clear in mine mind. :D
That's okay now. Forget it!
-
Aurel, getting a strange error when using tabs.
I create a new o2bas file in the first tab and put in my code and then save it.
I restart OxyEdit.
I load up the file I just saved into the first tab.
I open another existing o2bas file into a second tab.
All is fine so far.
Now in the first tab, I make changes. I got to the second tab to look up some code... I come back to first tab, the changes I made are gone.
For now I will save each time I make a change and before switching to another tab. But wanted to report this bug.
-
Hi Aurel,
What is naalaa, never heard before.
I read that it has an inline Assembler.
Aurel, what can you tell about this?
-
Okay, I know now what it is! ;D
-
Thanks Aurel, that is a nice addition!
-
I was wishing that I could select a bigger font in OxyEdit, but then I thought let me try the browser trick of CTRL+"plus key" so CTRL + + and sure enough you can keep tapping it till you get the font size you like :)
CTRL + - to make smaller. You need to use the + and - on the number keypad and not the ones on the top row of the main keyboard. Hope this helps others like me who like bigger fonts.
-
No need since that trick works just fine for me, thanks Aurel.
Getting nice color setting options would be nice however if you want to add anything.
-
Thanks Aurel looking forward for future versions. I use OxyEdit for oxygen coding too and am so happy you made it available for oxygen, thanks.
-
There might be a bug Aurel. Here is the situation.
I load an example file from the GUI examples folder. I run it from OxyEdit, it compiles and is fine.
I load up another example in a second tab from another folder, in this case OOP example folder.
I looked over the code in the OOP example and then closed the tab.
I then went to run the first tab and it gives me an error in one of the include files in that example. I know there is no problem as
it ran fine just a minute earlier. So I exit OxyEdit, run it again and load up the same GUI example file and it compiles and runs fine.
That is the best I can describe it. I have the latest oxygen alpha and oxyEdit installed.
-
Thanks Aurel, I am glad you found the solution so quickly.
-
That is great Aurel, thanks. Nice to have the options too.
-
Many thanks Aurel
I only have a limited time for testing but if you need word lists for syntax highlighting in a specific format then please let me know.
Charles
-
Aurel, not all keywords, operators etc., highlight properly as they are not in your word lists. I would take up Charles offer for word lists in a format you can use in OxyEdit, it will be excellent to have that completed. Thanks in advance to you and Charles.
-
Thanks again Aurel!!!
-
You are going to hate me Aurel, found a few more keywords that need to be added:
Not
Once
Public
Private
-
My fault!
Apart from 'not', these are secondary keywords. I have now added them to the keyword database so they will appear in future word lists.
Charles
-
Thanks guys. Nice to know all the keywords will be in there soon enough.
-
Thanks Aurel. Sorry been keeping you away from what you want to work on, but I do appreciate all the improvements you have made... those little things go a long way when looking at code for a long time, so thanks again.
-
Aurel, sorry again... but the new attachment still doesn't highlight not, once, public and private.
Perhaps you attached the wrong version or a files is missing, like scintilla properties?
-
Here is a screenshot Aurel, in mine it is not working... are you sure the right updated version was uploaded?
[attachment deleted by admin]
-
Thanks Aurel. This one works fine, thanks.
-
' for comments does not highlight correctly Aurel. I did try # and it does highlight fine, but # for comments causes problems in certain areas of code that I found out and so it is not really usable.
See attachment, thanks.
[attachment deleted by admin]
-
Aurel, ' works as line comment, but it is not highlighted as a comment in green, so the comments are not easy to observe. Check my screenshot, thanks.
-
Oh... Thanks Aurel, would never guessed that is the problem. Thanks for the solution!
-
After I installed the latest alpha oxygen, I just re-installed OxyEdit and all is colorful happiness again. Thanks.
-
Many thanks Aurel
I only have a limited time for testing but if you need word lists for syntax highlighting in a specific format then please let me know.
Charles
Charles, it would be neat to have word lists output in an organized way. Can you do lists for keyword, directives, constants, types, operators?
-
Aurel, I did some cleaning on my computer and went back to get the latest OxyEdit and now can't find the download link. Can you post the link when you have some time. Thanks in advance.
-
Hi Kent,
This is a rough and ready list, generated whenever the manual is rebuilt. (tools/ManualGen/KeywordsGrouped.txt
Grouped Keyword List:
Group: def macro
#view
#endv
version
new
del
Group: o2h low level macro
terminate
freestrings
freelibs
Group: o2 intrinsic function
getmemory
freememory
loadlibrary
freelibrary
getprocaddress
copy0
copy00
copyn
copy
mbox
comparestr
Group: reserved word
db
dw
dd
dq
exit
repeat
mov
lea
add
sub
mul
div
jmp
jz
jnz
call
and
or
xor
not
shl
shr
sal
sar
Group: type attribute with 1 param
sizeof
offsetof
spanof
typeof
structureof
prototypeof
statusof
recordof
encodingof
Group: o2 major keywords
incl
#semicolon
indexers
retn
offset
skip
rem
with
dataspace
data
o2
bind
defs
def
#def
type
struct
class
var
include
#include
asm
#asm
o2h
#o2h
basic
#basic
includepath
librarypath
#file
quote
typedef
union
#case
leaf
#lookahead
#autodim
#alert
#error
#pragma
#unique
#console
Group: o2h major keywords
enum
let
operator
dim
const
local
static
global
declare
function
sub
method
end
if
then
else
elseif
endif
endsel
do
while
enddo
endwhile
wend
exit
continue
break
switch
select
case
for
to
step
next
goto
gosub
methods
return
%
$
block
scope
#indexbase
indexbase
lib
library
extern
that
this
#noprec
#noinit
#byval
#byref
readstate
writestate
deff
Group: o2 major keywords
#if
#else
#elseif
#elif
#endif
#fi
#define
#ifdef
#ifndef
undef
#undef
#undefine
alias
macro
#blockdepth
#recordof
Group: C type keywords
void
byte
ubyte
string
wstring
bstring
gstring
bstr
bstring2
char
cstring
asciiz
zstring
zstring2
asciiz
short
long
int
integer
float
single
double
extended
ext
quad
word
dword
ulong
uint
qword
any
sys
bool
cpu
fpu
mmx
xmm
signed
unsigned
Group: overoadable intrinsic functions
news
frees
error
nuls
compile
uncompile
val
ltrim
rtrim
lcase
ucase
string
space
left
mid
_mid
instr
getfile
putfile
print
asc
unic
len
chr
wchr
str
hex
guidval
guidtxt
Group: intrinsic float macro
abs
acos
asin
atan
atn
cos
deg
frac
hypot
lin
log
log2
log10
logn
mod
pi
exp
pow
rad
recip
round
sin
sqr
sqrt
tan
trunc
Group: secondary keywords
inherits
of
from
has
lib
alias
export
external
com
virtual
public
protected
private
Group: declarative
dim
type
Group: secondary keywords
once
Group: declarative
$
%
Group: control / loop
if
Group: various
then"
data
else"
data
Group: control / loop
do
while
exit
continue
wend
enddo
for
to
step
next
select
case
Group: various
case
Group: control / loop
endselect
Group: declarative
type
Group: operator
load
=
:=
+
-
*
/
\
+=
-=
*=
/=
==
!=
<>
<
>
<=
>
>=
<=
and
or
xor
and=
or=
xor="
&
|
&=
|=
&&
||
<<
>>
Group: calling conventions
stdcall
cdecl
ms64
pascal
fpu
Charles
-
Thanks Aurel for the new version.
-
There is one thing that happens in OxyEdit on my computer. When I open an o2bas file, OxyEdit adds strange characters at the end of the file. I got used to it and just go to the end and delete them first. I was wondering if that is happening to you guys in Europe? Could that be an unicode issue?
-
I noticed in SciTe tonight too Aurel. You are right, it happens in some cases and not in others.
-
Aurel,
This is pure Oxygen Mathematics, good for the brain cells. :D
-
Yes, I've noticed this, and also the line numbers are not reported in Asm error messages.
It is not so straight forward because source stream is read destructively with chunks of code being expanded then inserted back into the source stream.
Charles
-
I traced this problem to the compilers which prefix a few lines of code to the source, displacing the line count. So I rebuilt them. You may still see the compiler one line ahead before the error is reported since it has to look ahead sometimes before determining there is an error.
Line numbers are also reinserted for the assembler pass.
Charles
-
Hi Aurel its these macros in ide/oxygen.properties:
# BUILD
basbo="$(SciteDefaultHome)\gxo2" " -a -c -m $(FilePath)"
command.build.*.bas=$(basbo)
command.build.*.o2bas=$(basbo)
There is a problem with the Asm listing at present. It is incomplete. Something to do with the new compilers which I need to fix.
But they produce working EXE files. It is just the listing.
Charles
-
I am still getting strange characters at the end of a file Aurel when I open an example.
But am glad you are updating your nice editor.
-
Thanks Aurel.
I will take a look soon.
-
Hi Aurel,
You can see, which version you have. Just look at the date.
The latest version is dated 18.o3.2012
-
Hi Aurel,
It seems that is a DLL chaos here. I think that older DLL's should be deleted.
If you run your application with an older Dll, and someone has a newer Dll, what then?
There will be a chaos.
LARGE_INTEGER must be QUAD!
Declare Function QueryPerformanceCounter Lib "kernel32.dll" (ByRef lpPerformanceCount As QUAD) As Long
Declare Function QueryPerformanceFrequency Lib "kernel32.dll" (ByRef lpFrequency As QUAD) As Long
-
Hi Aurel
print hex version
this will display the version number: A038 A039 etc.
Charles
PS: if you prefer:
typedef quad LARGE_INTEGER
-
You can get the latest dll: OxygenBasic (in-progress) from the website downloads page. It is quite stable. I am almost ready to release it as Alpha 39.
http://www.oxygenbasic.org/downloads.htm
-
This is a lot more stable than previous versions, with a much wider range of Win API examples for testing.
Charles
-
Looks nice in the screenshot Aurel. Keep up the good work!!
-
Also added button 'GoTo' and edit control for entering number of line.
You could add a bookmark feature that tags lines. This makes it easier to tab between sections of code you're currently working on.
-
Thanks Aurel :)
BTW: I found that Large_Integer is actually a structure.
typedef union _LARGE_INTEGER {
struct {
DWORD LowPart;
LONG HighPart;
};
struct {
DWORD LowPart;
LONG HighPart;
} u;
LONGLONG QuadPart;
} LARGE_INTEGER, *PLARGE_INTEGER;
It caused me some confusion when I tried to use it in C. I cant understand why anyone would want to split it into 2 integers.
Charles
-
No, Oxygen has quad as the core type for 8 byte integers. For Arithmetic, In 64 bit mode it uses the CPU, and in 32 bit mode, it uses the FPU.
Charles
-
Yes, is okay.
I am missing SAVE SETTINGS. this would be also a fine thing.
-
Hi Aurel,
if I leave OxyEdit then I get a memory leak. OxyEdit is still running in the background.
creating an exe file immediate is unnecessary. Has only sense, if you click on "build".
OxyEdit creates an exe file always again when you click on compile! >:(
if you create an exe file then you must bind the Oxygen.dll into the exe file.
-
Hi Aurel,
memory leak is vanished.
I still need the oxygen.dll!
How many files can I open? It's possible at all ?
Anyway, looks fine until now!
X
-
Hi Aurel,
Do you type this here?
$ exe
$FileName "name_of_file.exe"
include "Rtl32.inc"
-
I use that, if I create an exe file, which contains the Oygen.dll.
Mysterious things are going around here.
Shortly, I saw a ghost which was eating my source code!
-
Shortly, I saw a ghost which was eating my source code!
No fears, that's the dead code removal feature Aurel implemented. Maybe he got the jump on us when Charles mentioned the feature in the latest WIP of O2. 8)
-
WIP of O2 - what is this
Translation: OxygenBasic (latest) Work In Progress Release
-
Hi
where can i get OxyEditor
thanks
-
thanks a lot :)
-
Aurel ,
thanks for that beautiful Editor , but sometimes it closed it self with out any close action by me.
I will try Sphinx C-- editor , it is not finished but can handle the work.
-
here it is with source code
i will check your new one , thanks.
X
-
who is author of this editor ?
the auther is QS_Ong ,
see this like http://c--sphinx.narod.ru/indexe.htm (http://c--sphinx.narod.ru/indexe.htm) the program name is "cmmedit.zip (75k)"
-
and currently can compile file but cannot run compiled
I have fixed it.
here is the run function before the fix
void run(dword lpFileName)
{
byte outbuffer[256];
STARTUPINFO startupinfo = 0;
PROCESS_INFORMATION pinfo = 0;
lstrcpy(#outbuffer,lpFileName);
lstrlen(lpFileName);
lstrcpy(#outbuffer[EAX-3],"exe"); // here is the error
CreateProcess(0,#outbuffer,0,0,TRUE,0,0,0,#startupinfo,#pinfo);
}
and here is the correct line after fixing
lstrcpy(#outbuffer[EAX-5],"exe");
really i want to see Oxygen someday sporting 'Heih Level asm' just like Spinx c-- and ziron (http://codeziron.com/)
X
-
here it is c--39b26.zip (299k) , C-- compiler (v0.239 b26 ) beta version.
from here http://c--sphinx.narod.ru/indexe.htm (http://c--sphinx.narod.ru/indexe.htm)
-
i am not sure what you exactly mean under Heigh Level asm but oxygen
(http://i am not sure what you exactly mean under Heigh Level asm but oxygen)
Ok Aurel ,
see this function from Sphinx c--
void RemoveFileExt(dword lpFileName)
{
lstrlen(lpFileName);
EDX = lpFileName;
WHILE (EAX)
{
EAX--;
IF(DSBYTE [EDX+EAX]=='.')
{
DSBYTE [EDX+EAX] = 0;
BREAK;
}
}
}
and this from Ziron , i have add some Plugins for that language see this http://codeziron.com/forum.php?page=topic&id=140
//http://codeziron.com/forum.php?page=topic&id=31
function getFileExt(char* path) {
eax = path;
while (char[eax] != 0) {
eax++;
}
while (char[eax] != ord('.')) {
eax--;
}
eax++;
}
and here may latest try with HighLevelAsm with BCX
http://tech.groups.yahoo.com/group/BCX/message/42880
-
void RemoveFileExt(dword lpFileName)
{
lstrlen(lpFileName);
EDX = lpFileName;
WHILE (EAX)
{
EAX--;
IF(DSBYTE [EDX+EAX]=='.')
{
DSBYTE [EDX+EAX] = 0;
BREAK;
}
}
}
This high assembling is really a stupid thing.
C is much easier and has the same effect.
I program directly with machine-code, that is really an easy thing.
We can directly insert asm code in Basic code. What want we more?
-
but i am not asm coder and i prefer basic...
That is so, I have no idea about machine-code programming. :D
-
like brad'pete'
Charles, Aurel annoys me, banish him! ;D
-
like brad'pete'
Charles, Aurel annoys me, banish him! ;D
+1 ;D
-
stupid thing
peter , i think this is not constructive at all.
C is much easier and has the same effect.
I program directly with machine-code, that is really an easy thing.
We can directly insert asm code in Basic code. What want we more?
you are totally wrong , the idea here is not inserting asm code with basic or ogram directly with machine-code.
it is all about the presentation readability of the source code For Eaxmple ,which is the beter
mov Eax , 10
Or
Eax = 10
if any one has no idea about asm , he will recognize the last one.
-
mov eax,10 is better, I see what I do.
EAX=10 looks like a variable EAX!
Okay, I have no knowledge about machine programming. I am an idiot.
-
EAX=10 looks like a variable EAX!
in High Level asm , all registers name "Eax,ebx....." are reserved word , so you can not use them as a variable.
-
In OxygenBasic you can be very naughty with registers, and treat them as variables, as long as you know which get overwritten and when. The ebx,ebp,and esp registers should always be restored if asm instructions write to them.
Eax is a very busy register since it is used as the integer accumulator, but this works
eax=0x123
print hex eax
Charles
-
ok , when we code in asm , we should take care of which register should not be changed and which are not.
but this works
eax=0x123
does that supported aslo
if eax = 10 .....
-
eax=100
if eax=100
print "yes"
else
print "no"
end if
-
thanks peter :)
but the question here , does Oxygen treats eax as a register or just a variable ?
-
Have a look!
eax=100
push eax
if eax=100
print "yes"
else
print "no"
end if
pop eax
xor edx, edx
mov edx, eax
print edx
if eax >99 then print "I am 100" 'does work!
if eax <101 then print "What?" 'doesn't work
-
Yes but eax is overwritten by a booli, so no good for elseif.
You should be able to do select eax .. case .. end select
in these cases eax is a register.
If you are not using assembler in a function it is also possible to hijack register names, by redefining them:
function f()
sys eax,ebx,ecx
...
end function
but you won't be able to use those names in assembler inside the function. Outside, they revert to asm registers.
-
Charles , what wrong with this code
$ filename "test2.exe"
include "..\..\inc\RTL32.inc"
addr ecx,xx
[ecx] = 100
print hex [ecx]
end
.xx
dd 0
it should print 100 , but it does not run at all
-
'$ filename "test2.exe"
'include "..\..\inc\RTL32.inc"
addr ecx,xx
[ecx] = 100
print hex [ecx]
end
.xx
dword 0
-
peter , the same here , nothing changed!!!!!
-
I got hex 64 =(100)
-
which version of Oxygen.dll you are using?
-
This version.
X
-
Please people....
return to BASIC ::)
What part of open source Basic compiler project don't you get?
-
peter , i have the same version , but still have the problem !!!!!
i am using win7 version 32
-
wierd, I am using Win7 64 bit!
-
The problem seems obvious to me, you're both using Windows. :D
-
Aright! This can not go well.
-
Actually you hold the title for stupid questions and in broken English.
-
you can kiss my white ass - gipsy child ;D
-
hi aurel, do you have any *.o2bas code example or snippet for tab's creation for your AsciEditor too? there was an example some weeks/month ago, but I think you have deleted this one. thanks.
frank
-
For anyone who might be interested to use or just try OxyEdit
Lovely bit of work that.
How are the paths to the O2 binaries handled? Are they hardwired or do you depend on the PATH settings?
Kind regards,
bugmagnet
-
I am not sure about what you mean...
for oxyEdit or AsciEdit ?
OxyEdit. I should have a look at AsciEdit too sometime, but I've been wanting to see OxyEdit since become aware of OxygenBASIC.
OxyEdit is clean and simple. I like it. I'm just curious to know how to configure it. Is is the expectation that the binary sits in the same folder as the Oxygen binaries, or does it depend on the PATH to find them?
Kind regards,
bugmagnet
-
Are you intending to develop OxyEdit any further? There's a panel down the left hand side called "Function Panel". It's always empty. What's it for?
Kind regards,
bugmagnet
-
So where can I download this AsciEdit from?
Bugmagnet
-
...
...removed!