cours_progra/q2/fonctio/tp2/spim-read-int.s
2023-05-05 13:02:58 +02:00

34 lines
356 B
ArmAsm

.data
question: .asciiz "Entrez un nombre: "
gr: .asciiz "Trop Grand!\n"
pe: .asciiz "Valeur acceptee\n"
.text
main:
la $a0, question
li $v0, 4
syscall
li $v0, 5
syscall
bgt $v0, 10, grand
bgt $v0, 0, petit
jr $ra
grand:
la $a0, gr
li $v0, 4
syscall
j main
petit:
la $a0, pe
li $v0, 4
syscall
lr $a0,
li $v0, 4
syscall
j main