64,639
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#include <stdlib.h>
char str1[] = "%d %d\n";
char str2[] = "%d\n";
int a = 0,b = 1;
int main()
{
_asm
{
mov eax,offset a
push eax
mov eax,offset b
push eax
mov eax,offset str2
call scanf
pop ebx
pop eax
mov a,eax
pop eax
mov b,eax
mov eax,a
push eax
mov eax,b
push eax
mov eax,offset str1
push eax
call printf
pop ebx
pop ebx
pop ebx
}
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char str1[] = "%d %d";
char str2[] = "%d\n";
int a = 0,b = 1;
__asm
{
pushad
lea eax, a
push eax
lea eax, b
push eax
lea eax, str1
push eax
call scanf_s
add esp, 0xC
mov eax, a
add eax, b
push eax
lea eax, str2
push eax
call printf_s
add esp, 0x8
popad
}
system("pause");
return 0;
}