The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: anuradha on April 05, 2007, 07:19:46 PM

Title: Iczelion's tut 7 "?"
Post by: anuradha on April 05, 2007, 07:19:46 PM
hi guys

I have a small question?

.data
ClassName db "SimpleWinClass",0
AppName  db "Our First Window",0
MouseClick db 0         ; 0=no click yet

.data?
hInstance HINSTANCE ?
CommandLine LPSTR ?
hitpoint POINT <>

according to Iczelion's tut 7 , he used ".data" and ".data" to declare variables
what is the difference between them?

what is the purpose of using "?" in .data part?

can any one help me pls...
Title: Re: Iczelion's tut 7 "?"
Post by: Rainstorm on April 05, 2007, 07:47:24 PM
hi,

.data ?  - just reserves the space.
as you can see no values have been assigned to the variables declared in the  .Data? sectiion

hInstance HINSTANCE ?
HINSTANCE  = dword (in terms of size)
same as using ;  hInstance dd  ?
Title: Re: Iczelion's tut 7 "?"
Post by: dsouza123 on April 05, 2007, 08:07:35 PM
.data has (mainly) initialized variables, they are stored in the exe file, and add to the exe size.
.data? are unitialized variables that are NOT stored in the exe file.

uninitialized variables can also be declared in the .data section

.data
   num1 dd ?
   num2 dd 0