Hi all.

I am currently working on implementing structure code complete in RadASM. As there are many ways to reference a structure I might be missing some.

Referencing a structure.

1.
assume edx:ptr RECT
mov eax,[edx].left
2.
mov eax,(RECT ptr [edx]).left
3.
mov eax,RECT.left[edx]
4.
LOCAL rect:RECT
mov eax,rect.left



Declaring a structure.

1.
LOCAL rect:RECT
2.
LOCAL rectarray[10]:RECT ;Array of 10 RECT's
3.
.data?
rect RECT <?>
4.
rectarray RECT 10 dup(<?>) ;Array of 10 RECT's


My question is. Am I missing a way to reference or declare a structure.

KetilO
Posted on 2002-01-27 13:15:42 by KetilO


mov eax, [edx].RECT.left
Posted on 2002-01-27 13:40:09 by Aaro
Thanks Aaro

I knew I missed at least one.

KetilO
Posted on 2002-01-27 13:51:19 by KetilO
here's another you missed:
mov eax, [edx][RECT.left]
Posted on 2002-01-30 15:58:40 by NEMO
How about:
mov eax, [edx + RECT.left]
Posted on 2002-01-30 16:11:32 by dxantos
heres another one:
mov eax, [edx.RECT.left]
Posted on 2002-01-30 17:21:16 by NEMO
Ni NEMO & dxantos

Good to know. None of them makes it nececary to change my messy algo, phew.

KetilO
Posted on 2002-01-30 19:57:26 by KetilO