How does MASM .DATA? directive work internally [duplicate]

只愿长相守 提交于 2020-01-13 16:56:12

问题


In Kip Irvines book I came across the following :

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 followingcode is declared efficiently:

.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

bigArray DWORD 5000 DUP(?) ; 20,000 bytes

What exactly is the .data? directive doing under the hood in the above example to make the program 20k smaller.


回答1:


The uninitialized data need not be in the compiled binary, just a byte count that the OS loader allocates at run-time when executing your program.



来源:https://stackoverflow.com/questions/7137049/how-does-masm-data-directive-work-internally

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!