In .data section, if you use ? in place of an initializer, the assembler
will allocate the space but doesn't initialize it. You should do it at
run time. All data declared in this section would take up space in .exe
file and will be copied into memory when the program is run.
In .data? section (or BSS segment), it doesn't take space in .exe file
for those uninitialized data. A declaration of initialized data in this
section brings a warning message. Please also note that microsoft
compiler stores uninitialized data separately due to the efficiency issue.
That is, in the following program, var1 and var2 will not be allocated in a
continuous space.
.data
var1 byte 01h
.data?
var2 byte ?
.data
var3 byte 02h
※ 引述《alex1025 (我不在系馆喔!!)》之铭言:
: as title
: 会在组译的时候写入到档案吗?
: 应该不会不是吗?
: 还是我的观念错误?
: 如果不写入档案
: 我在vc时
: .data
: numbers BYTE 10000 DUP(0)
: 需要两秒钟
: .data
: numbers BYTE 268435456 DUP(0)
: 跑了二十分钟还没出来
: 还有我发现只要数字很大 工作管理员ml.exe cpu100% 内存使用量不断往上跳