I am a new bee of assembly language. When i am learning to write a struct, strange things happened.
This is the struct i define
User struct
name byte 20 dup(0)
password byte 10 dup(0)
more byte "bbbbbbbbbbbbbbbbbbbbbbbbbbbb"
User ends
this is how i declare a variable
user1 User <"chi","fan">
but when i inspect variable user1 in visual studio 2019, i cant see the first member of struct name
my full code of data.asm
Employee struct
IdNum byte "000000000" ; 9
LastName byte 30 DUP(0) ; 30
ALIGN word ;
Years word 0 ; 2
ALIGN dword ;
SalaryHistory dword 0,0,0,0 ; 16
Employee ends
Employee2 struct
IdNum byte "000000000" ; 9
LastName byte 30 DUP(0) ; 30
ALIGN word ;
Years word 0 ; 2
ALIGN dword ;
SalaryHistory dword 0,0,0,0 ; 16
Employee2 ends
User struct
name byte 20 dup(0)
password byte 10 dup(0)
more byte "bbbbbbbbbbbbbbbbbbbbbbbbbbbb"
User ends
user1 User <"chi","fan">
worker4 Employee <"888","555">
worker2 Employee2 <"aaa","bbb">
my full code in main.asm
.386
.model flat,stdcall
.stack 4096
ExitProcess proto,dwExitCode:dword
.data
include data.asm
.code
main PROC
mov worker4.SalaryHistory, 1000H ;
;
invoke ExitProcess,0
main ENDP
END main
environment: windows,visual studio 2019

