flat assembler
Message board for the users of flat assembler.
Index
> Main > Memory question |
Author |
|
revolution 11 Sep 2017, 21:05
For x86 a dword (dd) is 4 bytes. So your allocated memory is 40 bytes. At program start the memory is initialised to 10 copies of 0x00000000 (40 bytes of 0x00).
|
|||
11 Sep 2017, 21:05 |
|
The_Unknown_Member 11 Sep 2017, 21:07
revolution wrote: For x86 a dword (dd) is 4 bytes. So your allocated memory is 40 bytes. At program start the memory is initialised to 10 copies of 0x00000000 (40 bytes of 0x00). The initialization happens in run-time or assemble-time ? |
|||
11 Sep 2017, 21:07 |
|
revolution 11 Sep 2017, 21:11
The assembler sets the initial values. At runtime the loader will allocate the memory and copy the initial values from the exe file into RAM.
|
|||
11 Sep 2017, 21:11 |
|
The_Unknown_Member 11 Sep 2017, 21:50
revolution wrote: The assembler sets the initial values. At runtime the loader will allocate the memory and copy the initial values from the exe file into RAM. Okay so the initial values are in the exe after the assemblation but If I change the value of the address with an instruction it will be done in run-time ? Did I understand it correctly ? |
|||
11 Sep 2017, 21:50 |
|
revolution 11 Sep 2017, 21:55
If the memory is marked as writeable then you can change the values at runtime as many times as needed. At startup the initial values will always be 0x00000000 as loaded from the exe file.
|
|||
11 Sep 2017, 21:55 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.