Hi all,

how are you? hope all fine.

I got a little trouble using tasm IDEAL mode:

i have

struc first
a dd ?
ends

struc second
x dw ?
y dw ?
ends

union myunion
f first <>
s second <>
z dd ?
ends

struc mystruc
aaaa dd ?
bbbb dd ?
ccccc myunion <>
ends


when i do
mov , eax

i got 'bad operand size error, as if eax has a wrong size to be copied in myunion. But myunion is dd size.

If some suggestion... Thanks! B7
Posted on 2002-04-23 01:01:56 by Bit7
you need to specify which union member you want to write to:


mov [mystruc.ccccc.f.a], eax
mov [mystruc.ccccc.s.x], ax
mov [mystruc.ccccc.s.y], ax
mov [mystruc.ccccc.z], eax

you may also override this, though:


mov [dword mystruc.ccccc], eax
Posted on 2002-04-23 05:00:30 by Tola
Tola,

infinite thanks,

this is my first prog. in IDEAL syntax.


Bye B7
Posted on 2002-04-23 06:37:42 by Bit7