Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Requests and Feedback

ZirToken

A community discussion post from the original code:zIRON forum.

Replies

Colin admin
Posts
928
Threads
49
Location
Bulgaria

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 :)

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

What have you added this last version?

Colin admin
Posts
928
Threads
49
Location
Bulgaria

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.

Colin admin
Posts
928
Threads
49
Location
Bulgaria

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);
Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ok , update my H_strlen.

works fine.

http://www.freewebs.com/ogremagic/index.htm

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

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