$\require{cancel}$
.data text: .asciiz "hello world" endl: .asciiz "\n" .text .globl main main: la $t1, text li $t2, 0 top: lb $a0, text($t2) beqz $a0, done li $v0, 11 syscall la $a0, endl li $v0, 4 syscall addi $t2, $t2, 1 b top done: li $v0, 10 syscall