entry keyword
Hi Mr Colin,
i think entry keyword will direct the execution to the position where it is in.
but this example below works incorrect way.
program PE32_CUI 'entry keyword';
#include 'platform_def.zir';
#include 'console.zir';
aa: // this code executed 2 times ?????????????
mov eax, 5
print([dword]eax,'\n');
lret 0;
entry procedure WINAPI main() {
RTLMain();
println('Hello, World!');
call aa
wait_key();
ExitProcess(0);
}
also when decalr the subroutine in the end the lable will not be seen by Ziron, see this
program PE32_CUI 'entry keyword';
#include 'platform_def.zir';
#include 'console.zir';
entry procedure WINAPI main() {
RTLMain();
println('Hello, World!');
call aa
wait_key();
ExitProcess(0);
}
aa:
mov eax, 5
print([dword]eax,'\n');
lret 0;
also in lret 0; term what '0' means , and if possible , you can use ret instead of lret key word
,you can check if we are in subroutine exec lert event.
thanks.
http://www.freewebs.com/ogremagic/index.htm