Emil_halim
member
Posts
639
Threads
104
Location
Alex, Egypt
Post #1411
2014-12-01 19:21:43 UTC
Hi Mr Colin.
nice to see you again after a long time.
can you speed the rate of developing ziron.
i still prefer implement reg as a param in procedure and function
for example
procedure dump_mem(pointer mem; DWord len) {
uses edi;
edx = mem;
ecx = len;
eax = 0;
repeat {
al = [edx];
print([dword]eax, ' ');
edx++;
ecx--;
} until (ecx == 0);
print('\r\n');
}
can be like this
procedure dump_mem(edx , ecx) {
uses edi;
eax = 0;
repeat {
al = [edx];
print([dword]eax, ' ');
edx++;
ecx--;
} until (ecx == 0);
print('\r\n');
}
so when calling dump_mem like this
lab:
mov eax , 10
......
.......etc
dump_mem(@lab , 20); // @lab is address of memory , 20 is the length
will be
edx = @lab;
ecx = 20;
call dump_mem
it will be fast and optimized method.
what do you think?
also i think there is a bug , try this
program PE32_CUI 'my second application';
#include 'win_def.zir';
#include 'console.zir';
goto eee
fff:
eax = 10;
ret
eee:
call fff
print([dword]eax);
wait_key();
ExitProcess(0);
http://www.freewebs.com/ogremagic/index.htm
Colin
admin
Posts
928
Threads
49
Location
Bulgaria
Post #1413
2014-12-04 04:04:15 UTC
Hi Emil,
I will add it to my list, but my list is long.
As for your bug, can you try rent instead of ret, or use return and let me know.
Emil_halim
member
Posts
639
Threads
104
Location
Alex, Egypt
Post #1414
2014-12-04 17:15:57 UTC
Hi Colin,
only retn works well , but ret & return did not compile at all.
i think , all of the three instruction must wrok okay.
http://www.freewebs.com/ogremagic/index.htm
Emil_halim
member
Posts
639
Threads
104
Location
Alex, Egypt
Post #1415
2014-12-04 17:19:18 UTC
Oh...
after compiling the program crash when run it.
http://www.freewebs.com/ogremagic/index.htm
Emil_halim
member
Posts
639
Threads
104
Location
Alex, Egypt
Post #1416
2014-12-04 18:11:19 UTC
also , how to get the address of label
see that
Lab:
eax = lab;
http://www.freewebs.com/ogremagic/index.htm
Colin
admin
Posts
928
Threads
49
Location
Bulgaria
Post #1417
2014-12-04 18:46:19 UTC
Hi Emil,
ret and return both take 1 param. (i will look into correcting this)
fff:
return 10;
try the address operator "@", let me know if this does not work.
e.g. eax = @lab