|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Apr 2007
Messaggi: 381
|
Aiuto MIPS
Qualcuno mi dice dove ho sbagliato nel fare questo esercizio?
ecco il link con la traccia http://it.geocities.com/fliberat/arch2/maggio3.htm ed ecco l'esercizio .text .globl main main: subu $sp,$sp,8 sw $ra,0($sp) li $v0,5 syscall move $a0,$v0 li $v0,5 syscall move $a1,$v0 mul $t0,$a0,$a1 # a*b abs $t0,$t0 # |a*b| subu $t1,$a1,$a0 # |b-a| move $a0,$t0 # c move $a1,$t1 # d jal funzionemagica move $t5,$v0 li $v0,1 move $a0,$t5 syscall li $v0,10 syscall funzionemagica: subu $sp,$sp,8 sw $ra,0($sp) add $t0,$a0,100 # f=$a0+100 jal mcd move $a0,$t0 # f move $a1,$v0 # g subu $sp,$sp,8 sw $ra,0($p) jal funzionefacile jr $ra mcd: subu $sp,$sp,8 sw $ra,0($sp) start: beqz $a1,fine rem $t2,$a0,$a1 move $a0,$a1 move $a1,$t2 j start fine: move $v0,$a0 jr $ra funzionefacile: subu $sp,$sp,8 sw $ra,0($sp) ble $a0,$a1,salto mul $t4,$a0,$a1 add $t4,$t4,100 move $v0,$t4 jr $ra salto: mul $t4,$a0,$a1 sub $t4,$t4,100 move $v0,$t4 lw $ra,0($sp) add $sp,$sp,8 jr $ra |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Apr 2007
Messaggi: 381
|
ho risolto potete chiudere
|
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 22:51.