flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 22 Mar 2019, 06:54
You can set any flags you want into the file. You can make the heap any size you want. You can set any flag you want. But be aware that the OS might decide to override your setting, or simply ignore it if it makes no sense. Alternatively the OS might refuse to load it.
But you can test for yourself what happens in your OS, of course. For the most part the OS will try to make it work without too much bother to the user.. Sometimes when it is hopeless the OS just tells you it can't be loaded. Public and extrn only apply to linkable formats. Try it, fasm will tell you if it isn't permitted. What is "static" in this context? |
|||
![]() |
|
guignol 22 Mar 2019, 08:55
Why the OS?!
Why can't I just press the button, and everything under my ecstatic control? |
|||
![]() |
|
Ali.Z 24 Mar 2019, 07:29
ok ran some tests, and figured out some useful stuff.
every process have 1 default heap, even if heap-reserve and heap-commit are 0 in PE-optional header. in case program assembled with heap 0,0 the os (in my case) assigned default heap size to 4000h. (so it make no sense if heap is 0, and must have at least 1 heap) heap 1,1 rounded up to 1-page boundary (in my system 1 page = 4-KB which is 1000h heap) heap 10000h,2000h commits 4000h only, more later when heapAlloc is called. if both reserve and commit are equal, then the system allocates the exact amount you specified. so it better to use heap 1000h,1000h to force the loader to allocate 1000h only. yet i did not understand the on operator, so maybe someone can tell me how it works or used for what ... etc. _________________ Asm For Wise Humans |
|||
![]() |
|
Tomasz Grysztar 24 Mar 2019, 11:28
Ali.Z wrote: yet i did not understand the on operator, so maybe someone can tell me how it works or used for what ... etc. The DOS program that you specify for stub does not need to be in MZ format. If it is a classic .COM program, fasm converts it into MZ and uses as stub. A commonly used setting is: Code: format PE on "nul" |
|||
![]() |
|
Ali.Z 24 Mar 2019, 12:24
ah that make sense, now i understand what it does.
i have tested all what you said and compared results, that very cool thank you tomasz. i used fasttracker2 as a custom stub LOL. btw why fasm1 dont have any operators or such for PE header and optional header? _________________ Asm For Wise Humans |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.