结构体作为参数,赋值问题~
汇编中的结构作为方法的接收参数:
TMsgHead STRUCT
nMsgLen DWORD ?
nCmdId DWORD ?
nSeq DWORD ?
nMagic DWORD ?
sVersion db 8 dup(?)
sProtocolVer db 4 dup(?)
TMsgHead ENDS
stMsgHead TMsgHead <?>
用这种方式给结构体赋值:
push dword ptr [eax]
push dword ptr [eax+4]
push dword ptr [eax+8]
push dword ptr [eax+12]
pop stMsgHead.nMagic
pop stMsgHead.nSeq
pop stMsgHead.nCmdId
pop stMsgHead.nMsgLen
问题一:
sVersion和sProtocolVer不知道如何赋值。。。。。
问题二:
是否可以使用assume指令代替PUSH POP的赋值方式