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 :
first db ?
second dd ?
third db ?
Initializedstructure struct1 <4,10>
mov eax, struct1.first
mov ebx , struct1.second
mov ecx , struct1.third
mov eax , offset struct1.first
mov ebx , offset struct1.second
mov ecx , offset struct1.third
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 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?