Advertisement
zhukov000

Untitled

Feb 24th, 2020
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.   int x, a;
  6.   scanf("%d", &a);
  7.  
  8.   __asm__ ( "movl $0, %%ebx;"
  9.             "movl $0, %%ecx;"
  10.             "movl $140, %%edx;"
  11.  
  12.             "LoopSt:"
  13.             "cmp %%ebx, %%edx;"
  14.             "JLE LoopFin;"
  15.             "addl %%eax, %%ebx;"
  16.             "inc %%ecx;"
  17.             "JMP LoopSt;"
  18.             "LoopFin:"
  19.            : "=c"(x): "a"(a));
  20.  
  21.   printf("%d", x);
  22.   return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement