21,458
社区成员
发帖
与我相关
我的任务
分享
static NAKED creatWindow() // [esp]指向5,[esp+4]指向14
{
cout <<"function A part 1" <<endl; // 3
TempRet // 4,将[esp]改为指向12,并转到5执行,[esp+4]指向14
cout <<"function A part 2" <<endl; // 12
RET // 13,转到[esp]指向的地址,即14,并esp+4
}
static NAKED setCooperativeLevel() // [esp]指向8,[esp+4]指向12,[esp+8]指向14
{
cout <<"function B part 1" <<endl; // 6
TempRet // 7,将[esp]改为指向10并转到8执行,[esp+4]指向12,[esp+8]指向14
cout <<"function B part 2" <<endl; // 10,[esp]指向12,[esp+4]指向14
RET // 11,转到[esp]指向的地址,即12,并esp+4,[esp]指向14
}
static void otherfunc() // [esp]指向10,[esp+4]指向12,[esp+8]指向14
{
cout <<"other func" <<endl; // 9
} // 转到[esp]指向的地址,即10,并esp+4
NAKED SetupDX7() // [esp]指向14
{
creatWindow(); // 2
setCooperativeLevel(); // 5
JUMP otherfunc; // 8
}
int main()
{
SetupDX7(); // 1
return 0; // 14
}