Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MIPS: How to parse an number

  1. Sep 19, 2009 #1
    I am taking a MIPS class this semester and for some reason I am having a tough time parsing out an integer. Can someone give me a hint what I am doing incorrectly here? Below, I am attempting to parse the "7" and "2" out that are currently stored in register $t1. The reason for this is I later on need to compare the "7" and "2" against another number. Thanks.

    Code (Text):

    # UNTITLED PROGRAM

    .data   # Data declaration section

    .text

           main:      # Start of code section

                   li $t1, 7214
               move $a0, $t1
               li $v0,1

           exit:
                  li $v0, 10
                  syscall

    # END OF PROGRAM
     
     
    Last edited: Sep 19, 2009
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: MIPS: How to parse an number
Loading...