flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Borsuc 10 Jan 2010, 00:19
because .exe files are aligned to "pages". I suspect it's 128 bytes from your ~100 case. Are you talking about PE (Windows) exe files or DOS exe files btw?
PE will have at least 512 bytes alignment. If you want to see the exact size of your code use "format binary" |
|||
![]() |
|
Teehee 10 Jan 2010, 00:22
Win exe.
'format binary' generates a .bin ? |
|||
![]() |
|
bitshifter 10 Jan 2010, 00:23
yep, also
format binary as 'any' |
|||
![]() |
|
Borsuc 10 Jan 2010, 00:50
Win exe has PE (portable executable) format, and the file is aligned to at least 512 bytes (by default, some HLL compilers go as high as 16K
![]() and yes you can put "format binary as 'xyz'" where 'xyz' is whatever extension you want! |
|||
![]() |
|
Teehee 10 Jan 2010, 09:40
nice
![]() |
|||
![]() |
|
f0dder 10 Jan 2010, 21:54
MZ EXEs use (hardcoded!) 512-byte page size
![]() PE EXEs can have lower file alignment than 512 bytes, but that isn't supported for usermode executables on all Windows versions (iirc it works fine for drivers, though). |
|||
![]() |
|
Borsuc 10 Jan 2010, 22:40
Interesting, I didn't know that. Thanks.
![]() |
|||
![]() |
|
f0dder 10 Jan 2010, 22:45
Borsuc wrote: Interesting, I didn't know that. Thanks. _________________ ![]() |
|||
![]() |
|
DOS386 12 Jan 2010, 08:18
Teehee wrote: When I compile a .com file, fasmw shows me the size (in bytes) of each change i do. Really ??? Quote: But the same does not happen with .exe files. I can coding, and coding, and coding, and it does not shows me each change. It just shows me the changes in big steps (like ~100bytes). DOS COM: no align (AKA 1 Byte) DOS MZ EXE: 16-Bytes align in the header but no align in file size (maybe some bloat linkers align to 512 Bytes ![]() Win32 PE EXE (app or driver or "special"): 512-Bytes align (down to 16 Bytes might work on NT but not on ME, some bloat linkers align to 4 KiB instead (or even 16 KiB ???) ![]() NOTHING: like ~100bytes |
|||
![]() |
|
f0dder 12 Jan 2010, 09:30
DOS386 wrote: DOS MZ EXE: 16-Bytes align in the header but no align in file size (maybe some bloat linkers align to 512 Bytes ![]() DOS386 wrote: Win32 PE EXE (app or driver or "special"): 512-Bytes align (down to 16 Bytes might work on NT but not on ME, DOS386 wrote: some bloat linkers align to 4 KiB instead (or even 16 KiB ???) 16KB alignment, though? Where have you seen that? O_o _________________ ![]() |
|||
![]() |
|
DOS386 12 Jan 2010, 09:33
f0dder wrote: Why "Me" and not "9x"? ME is more famous ![]() Quote: 16KB alignment, though? Where have you seen that? O_o See above: post by Borsuc |
|||
![]() |
|
f0dder 12 Jan 2010, 09:52
DOS386 wrote:
![]() DOS386 wrote:
_________________ ![]() |
|||
![]() |
|
Borsuc 12 Jan 2010, 17:54
I don't know -- I've just seen some poor apps with 16K alignment. I don't know if they use default settings or not, it was an assumption given the fact that it was noobs who made them and since they don't care about it why would they increase the default? But, just an assumption on my part.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.