Answer to Question #2748 in Assembler for kweens kaysha

Question #2748
hi i am a beginners in mips and we're given a homework to convert binary string into decimal
Objective: Introduce student to MIPS programming and the use of MIPS operations.

Weight: This assessment will be worth 3% of the whole course.

Due Date: April 16th 2011.

Main Task: Design and Implement a MIPS program that will convert a binary string into decimal.

Criteria

1. Prompt user to input a binary string of no more that 8 bits.- 10 pts
2. Verify if user input was all binary.(Prompt again if entry was wrong) - 30pts
3. Should contain at least 1 function. -10 pts
4. Should be commented to explain purpose of instructions. -10 pts
5. Calculate and display the correct answer for the user. - 40 pts


this is my code and i am so confused i really need help pls tell me what to do step by step because this is very hard for me as a beginner

.text
.align 2

# Let X be a binary number, n digits in length, compose of bits X n-1
#Let D be a decimal number
#Let i be a counter


main: li $v0, 4 #code for print string
la $a0, prompt #load address of prompt into $a0
syscall #print the prompt message

la $t3, True
lw $t5, 0($t3)
la $t3,False
lw $t6, 0($t3)
li $v0, 8 #code for read strings
la $a0, binary #addr of buffer (binary)
li $a1, 9 #size of buffer (1 byte)
syscall #

lw $t4, 0($a0)
lw $t6, 4($a0)
lw $t7, 8($a0)
lw $t8, 12($a0)
lw $t9, 16($a0)





Loop: beg $t4, $t5, convert





convert:





.data

prompt: .asciiz "Please Input a Binary String \n"
1
Expert's answer
2011-05-18T10:41:38-0400
Your question requires a lot of work and cannot be done for free. Submit it as an assignment to our control panel and we'll assist you.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS