Dear all:
first, let's see the following codes:
-- ------------------------------
_TX STRUCT
x DWORD ?
y DWORD ?
_TX ENDS
................................
_Test proc _stTX:_TX
mov _stTX.x, 20
mov _stTX.y, 20
_Test endp
************************
************************
************************
mov @stTX.x, 10
mov @stTX.y, 10
invoke _Test, @stTX
-----------------------
Now, the @stTX.x/@stTX.y is 10, but it is not my requirement.
I hope @stTX.x/@stTX.y become to 20.
and I try to change them to:
------------------------
_Test proc _stTX:PTR _TX
mov _stTX.x, 20
mov _stTX.y, 20
_Test endp
invoke _Test, addr @stTX
------------------------
but a miss appear(undefined symbol : x...)
How to pass this argument?
thanks and best regards.
billbear
first, let's see the following codes:
-- ------------------------------
_TX STRUCT
x DWORD ?
y DWORD ?
_TX ENDS
................................
_Test proc _stTX:_TX
mov _stTX.x, 20
mov _stTX.y, 20
_Test endp
************************
************************
************************
mov @stTX.x, 10
mov @stTX.y, 10
invoke _Test, @stTX
-----------------------
Now, the @stTX.x/@stTX.y is 10, but it is not my requirement.
I hope @stTX.x/@stTX.y become to 20.
and I try to change them to:
------------------------
_Test proc _stTX:PTR _TX
mov _stTX.x, 20
mov _stTX.y, 20
_Test endp
invoke _Test, addr @stTX
------------------------
but a miss appear(undefined symbol : x...)
How to pass this argument?
thanks and best regards.
billbear
_Test proc pstTX:ptr _TX
mov edx,pstTX
mov ._ST.x, 20 ;.STRUCTNAME.fieldname
mov ._ST.y, 20
RET
_Test endp
When passing structures using a single parameter, we must pass a Pointer to the structure (pointers are just dwords).
Remember to finish procedures with a RET statement :)
Thanks very much!
the problem has solved.
best regards.
billbear
the problem has solved.
best regards.
billbear