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