.section ".text" .align 4 .global add add: save %sp,-64,%sp add %i0,%i1,%i0 ret restore .section ".data" .align 8 .PRINTF1: .asciz "Entrez a et b : " .SCANF: .asciz "%d %d" .PRINTF2: .asciz "c : %d\n" .section ".text" .align 4 .global main main: save %sp,-104,%sp sethi %hi(.PRINTF1),%o0 or %o0,%lo(.PRINTF1),%o0 call printf nop add %fp,-4,%o1 add %fp,-8,%o2 sethi %hi(.SCANF),%o0 or %o0,%lo(.SCANF),%o0 call scanf nop ld [%fp-4],%o0 ld [%fp-8],%o1 call add nop mov %o0,%o1 sethi %hi(.PRINTF2),%o0 or %o0,%lo(.PRINTF2),%o0 call printf nop ret restore