First of all I wanna say that FASM is the greatest assembler i have ever seen.
But!
Are there any optimization algorithms within?
Sometimes it seems that fasm is iterating my loops to see if they are making sens? In this case you can allways see a status bar. Which you could normally not see if the program is very small. So what is fasm doing?
If I only some iterations in a loop FASM assembles fast.
If I have a greate amount of iterations (maybe a 1000000 times) it assembles very slow.
Another case was a dll. I used the smallest implementation of the essential DllEntry function. Looks like...
DllEntry:
mov eax,1
ret
This dll does not work because the DllEntry was not to find in the binary file.
But when I implemented some more instructions to the DllEntry...
DllEntry:
;hinstDLL,fdwReason,lpvReserved
mov eax,[esp+12]
cmp eax,DLL_PROCESS_ATTACH
je .process_attach
cmp eax,DLL_PROCESS_DETACH
je .process_detach
cmp eax,DLL_THREAD_ATTACH
je .thread_attach
cmp eax,DLL_THREAD_DETACH
je .thread_detach
.process_attach:
inc [instance_counter]
jmp .end_of_reason_check
.process_detach:
dec [instance_counter]
jmp .end_of_reason_check
.thread_attach:
jmp .end_of_reason_check
.thread_detach:
jmp .end_of_reason_check
.end_of_reason_check:
mov eax,TRUE
ret
...then everything is fine.
So what on earth is going on there?
And if there are any optimization, how can I disable them?
Please help.