repositories
/
TD_IML.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Code cleanups.
[TD_IML.git]
/
TD3
/
mips4.asm
1
.data
2
msg_input: .asciiz "Valeur entiere ? "
3
msg_addition: .asciiz "Addition des valeurs: "
4
msg_continue: .asciiz "Continuer ? (O/n) "
5
n: .asciiz "\n"
6
.text
7
start:
8
la $a0,n
9
li $v0,4
10
syscall
11
la $a0,msg_input
12
li $v0,4
13
syscall
14
li $v0,5
15
syscall
16
add $t0,$v0,$zero
17
la $a0,msg_input
18
li $v0,4
19
syscall
20
li $v0,5
21
syscall
22
add $t1,$v0,$zero
23
la $a0,msg_addition
24
li $v0,4
25
syscall
26
add $a0,$t0,$t1
27
li $v0,1
28
syscall
29
la $a0,n
30
li $v0,4
31
syscall
32
la $a0,msg_continue
33
li $v0,4
34
syscall
35
li $v0,12
36
syscall
37
# ascii code for O
38
beq $v0,079,start
39
# ascii code for o
40
beq $v0,111,start
41
li $v0,10
42
syscall