Commit | Line | Data |
---|---|---|
000bb88f | 1 | .data |
39734cca JB |
2 | msg_addition: .asciiz "Valeur attendue 97, obtenue " |
3 | msg_soustraction: .asciiz "Valeur attendue 63, obtenue " | |
4 | msg_multiplication: .asciiz "Valeur attendue 6111, obtenue " | |
5 | msg_division_quotient: .asciiz "Valeur quotient attendue 1, obtenue " | |
6 | msg_division_reste: .asciiz "Valeur reste attendue 29, obtenue " | |
7 | saut_de_ligne: .asciiz "\n" | |
000bb88f JB |
8 | .text |
9 | la $t1,34 | |
10 | la $t2,63 | |
11 | add $t3,$t2,$t1 | |
12 | la $a0,msg_addition | |
13 | li $v0,4 | |
14 | syscall | |
39734cca JB |
15 | add $a0,$t3,$zero |
16 | li $v0,1 | |
17 | syscall | |
18 | la $a0,saut_de_ligne | |
19 | li $v0,4 | |
20 | syscall | |
000bb88f | 21 | sub $t4,$t3,$t1 |
39734cca JB |
22 | la $a0,msg_soustraction |
23 | li $v0,4 | |
24 | syscall | |
25 | add $a0,$t4,$zero | |
26 | li $v0,1 | |
27 | syscall | |
28 | la $a0,saut_de_ligne | |
29 | li $v0,4 | |
30 | syscall | |
000bb88f JB |
31 | mult $t3,$t4 |
32 | mflo $t5 | |
39734cca JB |
33 | la $a0,msg_multiplication |
34 | li $v0,4 | |
35 | syscall | |
36 | add $a0,$t5,$zero | |
37 | li $v0,1 | |
38 | syscall | |
39 | la $a0,saut_de_ligne | |
40 | li $v0,4 | |
41 | syscall | |
000bb88f JB |
42 | div $t2,$t1 |
43 | mflo $t6 | |
44 | mfhi $t7 | |
39734cca JB |
45 | la $a0,msg_division_quotient |
46 | li $v0,4 | |
47 | syscall | |
48 | add $a0,$t6,$zero | |
49 | li $v0,1 | |
50 | syscall | |
51 | la $a0,saut_de_ligne | |
52 | li $v0,4 | |
53 | syscall | |
54 | la $a0,msg_division_reste | |
55 | li $v0,4 | |
56 | syscall | |
57 | add $a0,$t7,$zero | |
58 | li $v0,1 | |
59 | syscall | |
9cb0c823 | 60 | li $v0,10 |
39734cca | 61 | syscall |