fork download
  1. .data
  2. x:
  3. .long 0
  4. s:
  5. .string "%d\n\0"
  6.  
  7. .text
  8. .global main
  9. main: # int main()
  10. # {
  11. loop: # for (;;) {
  12. pushl $x # scanf("%d", &x);
  13. pushl $s
  14. call scanf
  15. addl $8, %esp
  16.  
  17. movl x, %eax # if (x == 42) break;
  18. subl $42, %eax
  19. jz break
  20.  
  21. pushl x # printf("%d\n", x);
  22. pushl $s
  23. call printf
  24. addl $8, %esp
  25.  
  26. jmp loop # }
  27. break:
  28.  
  29. xor %eax, %eax # return 0;
  30. ret
  31. # }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.asm:1: error: attempt to define a local label before any non-local labels
prog.asm:3: error: parser: instruction expected
prog.asm:5: error: parser: instruction expected
prog.asm:8: error: parser: instruction expected
prog.asm:9: error: parser: instruction expected
prog.asm:10: error: label or instruction expected at start of line
prog.asm:11: error: parser: instruction expected
prog.asm:12: error: parser: instruction expected
prog.asm:13: error: symbol `pushl' redefined
prog.asm:13: error: parser: instruction expected
prog.asm:15: error: parser: instruction expected
prog.asm:17: error: parser: instruction expected
prog.asm:18: error: parser: instruction expected
prog.asm:21: error: symbol `pushl' redefined
prog.asm:21: error: parser: instruction expected
prog.asm:22: error: symbol `pushl' redefined
prog.asm:22: error: parser: instruction expected
prog.asm:24: error: symbol `addl' redefined
prog.asm:24: error: parser: instruction expected
prog.asm:26: error: comma, colon or end of line expected
prog.asm:29: error: expression syntax error
prog.asm:31: error: label or instruction expected at start of line
stdout
Standard output is empty