Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  asm
Language: C/C++
Code:
#include<iostream>
int main()
{
cout<<"Assembly loop,x86 is epic"<<endl;
cout<<"enter loopoy numver"<<endl;
int yay;
cin>>yay;
int ou;
asm("movl %0,%%edx;"
"movl %%0,%%eax;"
"loop: subl %%1,%%edx;"
"subl %%1,%%eax;"
"cmpl %%0,%%edx;"
"jne loop;"
: "r" (yay)
: "=a" (ou);
);

cout<<"eax,  "<<ou<<endl;

cin>>ou;
     return 0;
}
          
          
Comments: