void test ( )
{
float Var = 0.5f;
float Min = 0.0f;
float Max = 1.0f;
BYTE Success;
_asm
{
FLD Var // ST(0) = Var
FComP Min // Compare Var to Min
JG Successful
Mov Success, 0
Jmp Done
Successful:
Mov Success, 1
Done:
}
printf( "Success: %i", (int)Success );
}
After I ran that, Success == 1. So it worked. But this did not:
void test ( )
{
float Var = 0.5f;
float Min = 0.0f;
float Max = 1.0f;
BYTE Success;
_asm
{
FLD Var // ST(0) = Var
FComP Max // Compare Var to Max
JL Successful
Mov Success, 0
Jmp Done
Successful:
Mov Success, 1
Done:
}
printf( "Success: %i", (int)Success );
}
Success == 0 after I ran this test, even though 0.5 is less than 1.0. So what am I doing wrong?
~CGameProgrammer( );