I'm currently learning assembly programming by following Kip Irvine's "Assembly Language for x86 Processor". In section 3.4.12, the author states:
The
.DATA?
directive declares uninitialized data. When defining a large block of uninitialized data, the.DATA?
directive reduces the size of a compiled program. For example, the following code is declared efficiently:.data smallArray DWORD 10 DUP(0) ; 40 bytes .data? bigArray DWORD 5000 DUP(?) ; 20,000 bytes, not initialized
The following code, on the other hand, produces a compiled program 20,000 bytes larger:
.data smallArray DWORD 10 DUP(0) ; 40 bytes bigArray DWORD 5000 DUP(?) ; 20,000 bytes
I want to see the memory footprint of each version of the code after the program is compiled, so I can see the effect of .data?
for myself, but I'm not sure how it can be done.