操作系统Win7 32位
1,int成员变量赋值
class CTest { public: CTest(void); public: int m_x ; int m_y; }; m_x = 1;对应的汇编 mov DWORD PTR [eax], 1 m_y = 3;对应的汇编 mov DWORD PTR [eax+4], 3
2,short成员变量赋值
class CTest { public: CTest(void); public: short m_x ; short m_y; }; m_x = 1; mov WORD PTR [eax], 1 m_y = 3; mov WORD PTR [eax+2], 3
3,unsigned char赋值
class CTest { public: CTest(void); public: unsigned char m_x ; unsigned char m_y; }; m_x = 1; mov BYTE PTR [eax], 1 m_y = 3; mov BYTE PTR [eax+1], 3
4,float 成员变量赋值
class CTest { public: CTest(void); public: float m_x ; float m_y; }; m_x = 1; fld1 fstp DWORD PTR [eax] m_y = 3 fld DWORD PTR __real@40400000 fstp DWORD PTR [eax+4]
5,double成员变量赋值
class CTest { public: CTest(void); public: double m_x ; double m_y; }; m_x = 1 fld1 fstp QWORD PTR [eax] m_y = 3; fld QWORD PTR __real@4008000000000000 fstp QWORD PTR [eax+8]
6,bool变量赋值
class CTest { public: CTest(void); public: bool m_x ; bool m_y; }; m_x = 1 mov BYTE PTR [eax], 1 m_y = 3 mov BYTE PTR [eax+1], 1