For my actual project i have defined all my datas as long to the datasection and read all them as long! All the values in the datasection are positiv and no value is bigger as 16000! To save some bytes (maybe 1 alignment, also 512 bytes) to the exe, i tried to define the complete data section to WORD and read them as word.
Normaly each .l value will be stored in 4 bytes and each .w value will be stored in 2 bytes - so the final exe should be possible smaller when using only .w instead storing all the data as long. In my project this is only theoretical and this is the point, i am very confused - because i have strange filesize results here!
filesize: 4096 bytes <-- All datas as WORD !!!!
filesize: 3584 bytes <-- All datas as LONG !!!!
Why is the version, using only longs - 1 alignment (512 bytes) smaller? I have tried to debug the datas for both versions and both version returning all datas correct! Atm this is a bit unlogical for me!
What happens to .w and .l ?
What happens to .w and .l ?
va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
While taking a look to both exe versions i noticed something at offset $600 - In the WORD based version some code is used from $600 to $612 and then all filed by zero up to $800 (also nearly one complete PE alingment)
When taking a look to the LONG based version, here the same topic code will end at $5A8 - so the next stuff will be begin at $600 instead at $800 like the WORD version! (same code)
When taking a look to the LONG based version, here the same topic code will end at $5A8 - so the next stuff will be begin at $600 instead at $800 like the WORD version! (same code)
va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,


