Advertisement
YauhenMardan

while_asm

May 6th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6. int a,i=1; //a-число, i-порядок
  7. cout<<"Type a"<<endl;
  8. cin>>a;
  9. __asm{
  10. mov eax,a
  11. mov ebx,i
  12. beg_:
  13. cmp eax,ebx
  14. jne end_
  15. mov eax,99
  16. jmp beg_
  17. end_:
  18. mov a,eax
  19. }
  20. cout<<a<<endl;
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement