This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15995|Reply: 2

[C] c Mini program written by Inline

[Copy link]
Posted on 10/4/2014 8:43:24 PM | | |
In this program, the C language and assembly inline made the divider taken out to offer the ugly god Mo Hei.


  1. #include <stdio.h>
  2. void main()
  3. {
  4. int a,c;
  5. int d;
  6. int b;
  7. printf("请输入一个数字");
  8. scanf("%d",&a);
  9. printf("请在输入一个数字");
  10. scanf("%d",&c);
  11. _asm
  12. {
  13.         push eax;
  14.                 push edx;
  15.                 push ecx;
  16.                 xor edx, edx;
  17.                 mov eax, a;
  18.                 mov ebx, c;
  19.             div ebx;
  20.                 mov [b], eax;
  21.                 mov [d],edx
  22.                 pop ecx;
  23.                 pop edx;
  24.                 pop eax;


  25. }
  26. printf("%d余数%d\n",b,d);
  27. }
Copy code






Previous:ITsvse.com forum "first" test post!
Next:Thinking about templates in C++
Posted on 10/8/2014 9:37:44 AM |
Posted on 1/9/2015 3:21:50 PM |
Learn it, the administrator has worked hard.
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com