All pastes #990844 Raw Edit

Untitled

public text v1 · immutable
#990844 ·published 2008-04-20 14:18 UTC
rendered paste body
michal@midell:~/soft> cat cos.s 
	.file	"cos.c"
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
.globl f
	.type	f, @function
f:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$8, %esp
	movl	8(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	$.LC0, (%esp)
	call	printf
	leave
	ret
	.size	f, .-f
.globl main
	.type	main, @function
main:
	leal	4(%esp), %ecx
	andl	$-16, %esp
	pushl	-4(%ecx)
	pushl	%ebp
	movl	%esp, %ebp
	pushl	%ecx
	subl	$20, %esp
	movl	$999, -8(%ebp)
	movl	-8(%ebp), %eax
	movl	%eax, (%esp)
	call	f
	movl	$0, %eax
	addl	$20, %esp
	popl	%ecx
	popl	%ebp
	leal	-4(%ecx), %esp
	ret
	.size	main, .-main
	.ident	"GCC: (SUSE Linux) 4.3.1 20080409 (prerelease) [gcc-4_3-branch revision 134138]"
	.section	.note.GNU-stack,"",@progbits