Hi guys. I understood from one of Frank's examples the way to use structs is something like
struc mystruc
fielda resd 1
fieldb resd 1
endstruc
and then
mov eax,mystruc
mov dword [eax+fielda],fieldc
In the assembler I use for work, we have a way to tell the assembler that a certain gpr should be used as a base address for a structure. It's actually more flexible and complicated than that, but what I want to know is if there is a way to accomplish that feature in NASM.
Edit: I guess the above example is invalid in x86 since you can't "mov" storage to storage, but I don't know how to give a more obvious example and I hope you get the general idea.
I would like to be able to let the assembler know that eax is the base register for mystruc so that I could refer to fields directly and do something like
mov eax,mystruc
; tell the assembler eax is the base address for mystruc
mov dword fielda,fieldc
Is this possible?
Thanks.