hi,
I'm trying to figure out how to use array and floats with asm
for example
int nOp1 = 10;
int nOp2 = 2;
in this case the result of eax = 15Code:int nOp1 = 10; int nOp2 = 5; __asm mov eax, nOp1; __asm add eax, nOp2;
in this case the result of eax = -4.3434515e-038Code:float fOp1 = 10.5f; float fOp2 = 3.07f; __asm mov eax, fOp1; __asm add eax, fOp2;
next problem i have i using array structures (stored in vector)
to store the execution of the opcode (r = a + b)Code:pCodes.push_back( OpCode( OC_MOV, a ) ); pCodes.push_back( OpCode( OC_ADD, b ) ); pCodes.push_back( OpCode( OC_MOVR, r ) );
this part of code is workingCode:pOC = pCodes[nCode]; __asm mov eax, pOC.Data
this ain't :Code:__asm mov eax, pCodes[nCode];.Data
warning C4537: 'nCode' : '.' applied to non-UDT type
error C2410: 'Data' : ambiguous member name in 'second operand'




)
Reply With Quote