News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Declaration of a Struct is Typed or Allocated?

Started by caraveiro, February 25, 2009, 03:28:54 PM

Previous topic - Next topic

caraveiro


.data?
    _SENSORDATA                 STRUCT 4
                                    dSensorIndex            dd ? ;0=NoUsed; 1 to 128=USB Devices, > 128=Others
                                    dSensorStatus           dd ? ;0=No Present 1=Plugged,2=UnPlugged
                                    dSensorMonitor          dd ? ;1=Plugged,2=UnPlugged To monitor attach/deattach
                                    dSensorState            dd ? ;0=Undefined,1=Free,2==Busy
                                    pSensorName             dd ? ;Pointer to Sensor Name
                                    dSensorNameSize         dd ? ;Size of Pointer Name (MAX_PATH)
    _SENSORDATA                 ENDS
    ;
    _SENSORLIST                STRUCT 4 ;align 4
                                    sd             _SENSORDATA 256 dup(<>)
    _SENSORLIST                ENDS
    ;
    sl                         _SENSORLIST    <>


Does _SENSORDATA and _SENSORLIST, from above code, is allocated in memory?

Does sl struct is really aling to 4?

I think I must to use the type or typedef, but dunno how to use it!, some one to enligth me?

"knowledge is now free at last, everything should be free from now on, enjoy knowledge and life and work for everybody else"
+ORC
http://www.fravia.com

PBrennick

The GeneSys Project is available from:
The Repository or My crappy website