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.
My question is. Am I missing a way to reference or declare a structure.
KetilO
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
mov eax, [edx].RECT.left
Thanks Aaro
I knew I missed at least one.
KetilO
I knew I missed at least one.
KetilO
here's another you missed:
mov eax, [edx][RECT.left]
How about:
mov eax, [edx + RECT.left]
heres another one:
mov eax, [edx.RECT.left]
Ni NEMO & dxantos
Good to know. None of them makes it nececary to change my messy algo, phew.
KetilO
Good to know. None of them makes it nececary to change my messy algo, phew.
KetilO