flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Ali.Z 14 May 2020, 04:21
off topic, i accidentally posted in macroinstructions while i meant to post it under compiler internals.
_________________ Asm For Wise Humans |
|||
![]() |
|
Tomasz Grysztar 14 May 2020, 04:28
No, you actually posted it in Compiler Internals, but I moved it because it concerns the behavior of "proc" macro, not internals of the assembler.
The standard "proc" macro is made in such way that it ignores the procedure definition completely unless you use this procedure somewhere. Because you do not call GetProcessInfo anywhere in your main code, nor export this procedure, fasm simply skips the definition entirely. And the "invalid application" that you get in the original case is simply an empty section problem. Your '.text' section does not contain anything then, because the procedure is not used and therefore ignored. Last edited by Tomasz Grysztar on 14 May 2020, 04:46; edited 1 time in total |
|||
![]() |
|
revolution 14 May 2020, 04:44
Ali.Z: If you look into the proc macro there is a line similar to this:
Code: if used GetProcessInfo
;...
end if |
|||
![]() |
|
Ali.Z 14 May 2020, 04:53
oh now it makes sense, as i was writing the function i hit CTRL-F9 to compile just to verify i have no error .. and after debugging some other code that is close to this PROC i noticed that CreateToolHelp32 was not there.
i think its a good feature although i wasted so much time trying to figure out why fasm it dont include this function, thank you so much both of you. _________________ Asm For Wise Humans |
|||
![]() |
|
AsmGuru62 14 May 2020, 17:47
Actually, that ability of proc/endp is excellent. If you have a large file with a lot of functions and just use a couple - only these functions are included into EXE.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.