Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .data
- str1: .asciiz "Cant de numeros: "
- espacio: .asciiz " "
- array: .space 512 # 128 ints
- .text
- main: li $v0, 4
- la $a0, str1
- syscall
- li $v0, 5
- syscall
- li $s0, 0
- la $t0, array
- or $s1, $v0, $0
- for1: bge $s0, $s1, seguir
- li $v0, 5
- syscall
- sw $v0, 0($t0)
- addi $s0, $s0, 1
- addi $t0, $t0, 4
- j for1
- seguir: li $s0, 0
- la $t0, array
- for2:
- bge $s0, $s1, ceguir
- li $v0, 1
- lw $a0, 0($t0)
- syscall
- li $v0, 4
- la $a0, espacio
- syscall
- addi $t0, $t0, 4
- addi $s0, $s0, 1
- j for2
- ceguir: li $v0, 10
- syscall
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement