Due to the following topic, Initializing a struct in win32 assembly programming using MASM
I tried to correct my mistakes, So I tried the following code :
.386 .model flat,stdcall option casemap:none struct1 struct first db ? second dd ? third db ? struct1 EndS .data Initializedstructure struct1 <4,10> .code start: mov eax, struct1.first mov ebx , struct1.second mov ecx , struct1.third ;offsets mov eax , offset struct1.first mov ebx , offset struct1.second mov ecx , offset struct1.third end start
But on the disassembled code didn't find any thing. I added the offset of each struct's member to distinguish the differences between the two.
.text:00401000 start: .text:00401000 mov eax, 0 .text:00401005 mov ebx, 1 .text:0040100A mov ecx, 5 .text:0040100F mov eax, 0 .text:00401014 mov ebx, 1 .text:00401019 mov ecx, 5
I've surfed the net but didn't find any documentation describing the use of structs well, so I decided to try it by myself. The disassembled code seems,it holds the size of each struct's member.
The main question is how to use the members of the struct within the code?