Skip to content
Snippets Groups Projects
Select Git revision
  • b1167b8ba1257a45763ea22f902e4540f26469ae
  • 2024ss default
  • 2023ss
  • 2022ss
  • 2021ss protected
5 results

calc-01.s

Blame
  • calc-01.s 736 B
    	.file	"calc-01.c"
    	.text
    	.section	.rodata.str1.1,"aMS",@progbits,1
    .LC0:
    	.string	"c = %d\n"
    	.text
    	.globl	main
    	.type	main, @function
    main:
    .LFB11:
    	.cfi_startproc                   ; #include <stdio.h>
    	subq	$8, %rsp                 ; 
    	.cfi_def_cfa_offset 16           ; int main (void)
    	movl	$10, %esi                ; {
    	leaq	.LC0(%rip), %rdi         ;   int a = 3;
    	movl	$0, %eax                 ;   int b = 7;
    	call	printf@PLT               ;   int c = a + b;
    	movl	$0, %eax                 ;   printf ("c = %d\n", c);
    	addq	$8, %rsp                 ;   return 0;
    	.cfi_def_cfa_offset 8            ; }
    	ret
    	.cfi_endproc
    .LFE11:
    	.size	main, .-main
    	.ident	"GCC: (Debian 8.3.0-6) 8.3.0"
    	.section	.note.GNU-stack,"",@progbits