Int addr.
Char * p=NULL;
Char [5] b={0};
int k;
_asm
{
Mov eax, 0 xeef5ec
Mov eax, [eax]
The add eax, 0 x80
FLD (eax)
Mov ecx, 0 xda0ed8
Fdiv (ecx)
Mov eax, 0 xb42d10
Call eax
Mov ebx, eax
Mov edi, 0 xa8
Lea ecx, 2-0 x195] [edi + edi *
SHL ecx, 6
Sub ecx, ebx
Mov eax, ecx
Mov addr, eax
Xor edi, edi
}
While (TRUE)
{
_asm
{
Xor edx, edx
Mov eax, addr
Mov ebx, eax
Mov ecx, 0 xa
Div ecx
Mov addr, eax
The mul ecx
Sub eax and ebx
Neg eax
Mov ecx, eax
The add ecx, 0 x30
Lea esi, b
Mov [esi + edi], ecx
Inc edi
Mov edx, 0
Mov ebx, edx
Mov eax, addr
The or eax and ebx
Mov k, eax
}
If (k==0)
break;
}
P=& amp; B [0];
_strrev (p);
AfxMessageBox (p);
VC6.0, can be executed correctly and properly the results
VS2017, program crashes, and get the result of wrong
VS compiler error free, without warning,
The annotation of the VS is as follows: 3 sentence will not collapse:
P=& amp; B [0];
_strrev (p);
AfxMessageBox (p);
Assembly code to confirm correct,
Ask everybody to help me, thank you.
CodePudding user response:
I estimate is the problem of dynamic base, VC6 compile base fixed, fixed loading base address specified in the VS2017 try, there are address hard coded in the code, base, address errorsCodePudding user response:
Those first few clear such as 0 xeef5ec immediately