Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .data
- A: .asciiz "Qtd. de caracteres: "
- B: .asciiz "Frase: "
- X: .asciiz "ciencia da computacao\n"
- .text
- .globl main
- main:
- li $t0, 0
- loop:
- lb $t1, X($t0)
- beq $t1, $zero, fimloop
- addi $t0, $t0, 1
- j loop
- fimloop:
- li $v0, 4
- la $a0, B
- syscall
- li $v0, 4
- la $a0, X
- syscall
- li $v0, 4
- la $a0, A
- syscall
- li $v0, 1
- addi $a0, $t0, -1
- syscall
- fim:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement