
.text
.global main                            /* program entry point */

main:
	pushl	%ebp
	movl	%esp, %ebp

        pushl   a
        call    abs
	addl	$4, %esp

	pushl	%eax
	pushl	$string
	call	printf
	addl	$8, %esp

	leave
	ret

abs:
	pushl	%ebp
	movl	%esp, %ebp

	movl	8(%ebp), %eax
        cmpl    $0, %eax
        jge     not_zero
        negl    %eax

not_zero:
	leave
	ret

.section	.rodata
    string:
	.string	"result is %d\n"

.section .data
    a:
	.long	-25

