it is looking very good, once you are done with your plugin to an offical finished release, maybe i will create a section of the website for finished plugin downloads - maybe i can replace the Source menu section that i never got round to doing anything with :)
ZirToken
A community discussion post from the original code:zIRON forum.
Replies
ok , this time the plugin make Ziron crashed after finishing compilation.
the source code can be downloaded from previous link.
http://www.freewebs.com/ogremagic/index.htm
What have you added this last version?
your strlen seems to have a problem..
//add some variable type
const MyType = 'type Integer = Int32; type String = char; type Uchar = char; type Schar = sbyte; type USHORT = word;';
Ziron_Execute(MyType, strLen(MyType)); //H_strlen(MyType))
This works.
your strlen function does not protect ebx.
registers eax, ecx and edx are trashable, all other must be protected in the windows platform.
function H_strlen(char* str) {
uses ebx;
Eax = nil;
Ebx = str;
while(char[Ebx] != 0) {
Ebx++;
Eax++;
}
}
a better alternative would be:
function H_strlen(char* str) {
Eax = str;
while(char[eax] != 0) {
Eax++;
}
sub eax, str
}
I have just extended the sizeof internal macro to support const strings
Ziron_Execute(MyType, sizeof MyType);
Hi
how can i allow plugin start handling assignment , for example , i want basic plugIn
to understand this lines
Dim buf$ * 100 // allocat 100 char in buf
buf = 'welocm here' //
print('assignment test = ', @buf , '\r\n');
BTW ,assignment in basic plugin will call H_strcpy function.
http://www.freewebs.com/ogremagic/index.htm
at some point i plan to add string assignment. Also i plan to add unnamed functions for plug-ins which would be useful for your type of plugin, i will let you know asap