fork download
  1. .data
  2. x:
  3. .long 0
  4. s:
  5. .string "%d\n\0"
  6. y:
  7. .long 5
  8.  
  9. .text
  10. .global main
  11. main: # int main()
  12. # {
  13.  
  14. pushl y # printf("%d\n", y);
  15. pushl $s
  16. call printf
  17. loop: # for (;;) {
  18. pushl $x # scanf("%d", &x);
  19. pushl $s
  20. call scanf
  21. addl $8, %esp
  22.  
  23. movl x, %eax # if (x == 42) break;
  24. subl $42, %eax
  25. jz break
  26.  
  27. pushl x # printf("%d\n", x);
  28. pushl $s
  29. call printf
  30. addl $8, %esp
  31.  
  32. jmp loop # }
  33. break:
  34.  
  35. xor %eax, %eax # return 0;
  36. ret
  37. # }
  38.  
Runtime error #stdin #stdout 0s 4192KB
stdin
1
2
10
42
11
stdout
Standard output is empty