update
This commit is contained in:
29
q2/fonctio/tp2/switch-table.s
Normal file
29
q2/fonctio/tp2/switch-table.s
Normal file
@ -0,0 +1,29 @@
|
||||
.data
|
||||
tab: .word case5, case6, case7, case8
|
||||
q1: .asciiz "Entrez un nombre entre 5 et 8:"
|
||||
|
||||
.text
|
||||
main:
|
||||
li $v0, 5
|
||||
la $a0, q1
|
||||
syscall
|
||||
|
||||
li $v0, 4
|
||||
syscall
|
||||
|
||||
|
||||
case5:
|
||||
|
||||
j end_case
|
||||
case6:
|
||||
|
||||
j end_case
|
||||
case7:
|
||||
|
||||
j end_case
|
||||
case8:
|
||||
|
||||
j end_case
|
||||
|
||||
end_case:
|
||||
jr $ra
|
Reference in New Issue
Block a user