.kdata string1: .ascii "I love my CS61c instructor and TAs!" .asciiz "\n" .ktext __start: mtc0 $0, $12 # Turn interrupts off lui $sp, 0x8000 # Initialize stack pointer to a very addiu $sp, $sp, -4 # high address (see P&H p.A-20). lui $gp, 0x1000 # Initialize global data pointer ori $gp, $gp, 0x8000 # (see P&H p.A-21). la $a0, string1 # Put string address in argument register. jal print done print: lui $t0,0xffff # Load address of device registers. ploop: lb $t1,0($a0) # Fetch next character and see if we're at addiu $a0,$a0,1 # at the end of the string. beq $t1,$0,fini addi $t2, $t0, 12 ready: lw $t4 8($t0) beq $t4 $0 ready sw $t1,0($t2) # Start transmitting character. j ploop # Go back for the next character. fini: jr $31 # All done: return.