title: MIPS - How to perform a shift on a string?
body: <p>I'm very new to MIPS programming, and I've been stuck on a problem I've been attempting to program. I realize what I'm trying to do may be silly, but bear with me please! Here's a description of what I'm attempting to do.</p>
  
  <p>Let's say that I have this string: "~~Hello World!". I want to obtain the string "Hello World!" by shifting this string left by two characters. So far, my closest attempt at performing such an operation is this:</p>
  
  <p>Let the register $t0 contain the string "~~Hello World!". I want to perform a left shift of 2 bits on this string and store in the register $t1.</p>
  
  <pre><code>.data
       output1: .asciiz "The value in $t1 is: "
  
  .text
       sll $t1, $t0, 2   # attempt at shifting left by 2 bits 
       li $v0, 4
       la $a0, output1
       syscall           # print "The value in $t1 is: "
       li $v0, 4
       move $a0, $t1
       syscall           # print the contents of the register $t1
  </code></pre>
  
  <p>However, when I assemble these instructions, I'm met with an address out of range error. Can anybody point out where I'm going wrong, and perhaps what I should do to achieve this?</p>