There is a code:
X STRUC UNION STRUC A1 BYTE ? BYTE ? BYTE ? ENDS STRUC A2 WORD ? WORD ? WORD ? ENDS STRUC A3 DWORD ? DWORD ? DWORD ? ENDS ENDS X ENDS How do I set a variable with initialized values? If I write this:
ZX <{<1,2,3>}> Then I get 3 elements of type BYTE (from structure A1). And if I want it to be not bytes, but DWORDs (i.e., initialize the values of the A3 structure), how can I write this?
In TASM, you can write this:
X STRUC UNION STRUC DB ? DB ? DB ? ENDS STRUC DW ? DW ? DW ? ENDS STRUC DD ? DD ? DD ? ENDS ENDS X ENDS ZX <<?,?,<1,2,3>>> But in MASM32 so not a ride. How then ???
dd, thenZX <<1,2,3>>or something like that (neither masm nor winds in the household have been around for a long time to check). - PinkTux