En este programa, el lenguaje C y la línea de ensamblaje hicieron que el separador se retirara para ofrecer al feo dios Mo Hei.
- #include <stdio.h>
- void main()
- {
- int a,c;
- int d;
- int b;
- printf("请输入一个数字");
- scanf("%d",&a);
- printf("请在输入一个数字");
- scanf("%d",&c);
- _asm
- {
- push eax;
- push edx;
- push ecx;
- xor edx, edx;
- mov eax, a;
- mov ebx, c;
- div ebx;
- mov [b], eax;
- mov [d],edx
- pop ecx;
- pop edx;
- pop eax;
- }
- printf("%d余数%d\n",b,d);
- }
Copiar código
|