annonce 1

Bandeau publicitaire haut

jeudi 24 novembre 2011

Tab

A friend gave me this code, and told me there was a fail somewhere in, but i can"t find it... 

Anybody see where this code fail ?
(Asm language)

fact:   blez $a0fact_0  
        sub  $sp$sp, 8
        sw   $ra, 0($sp)     
        sw   $a0, 4($sp)   
        sub  $a0$a0, 1 
        jal  fact         
        lw   $a0, 4($sp)   
        mul  $v0$v0$a0  
        lw   $ra, 0($sp)  
        add  $sp$sp, 8        
        j    $ra            
fact_0:
        li   $v0, 1         
        j    $ra

6 commentaires: