flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 13 May 2016, 14:30
Just use RB:
Code: struct SomeStruct SomeArray dd ? rb 40 SomeOtherValue dd 0 ends Code: struct SomeStruct SomeArray rd 11 SomeOtherValue dd 0 ends |
|||
![]() |
|
MUFOS 13 May 2016, 14:50
I may be picky, but doesn't this mean the program size would be +40 bytes?
You see I never assign struct on compiletime, so is there any way to do it without adding the extra bytes? |
|||
![]() |
|
revolution 13 May 2016, 15:19
It depends upon how you allocate the structure. If you statically add it within your code section, or within the initialised data then it will take up space in the exe file. But you can put it at the end of the data into the uninitialised portion and it won't take up any space in the exe file.
|
|||
![]() |
|
MUFOS 13 May 2016, 15:29
revolution wrote: It depends upon how you allocate the structure. If you statically add it within your code section, or within the initialised data then it will take up space in the exe file. But you can put it at the end of the data into the uninitialised portion and it won't take up any space in the exe file. I would like to allocate it on runtime using the heap. Can you show me an example of uninitialized data? |
|||
![]() |
|
revolution 13 May 2016, 23:35
What OS are you using? What file format?
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.