then output this (with an appropriate label) in hex. Make sure that you have lots of comments in your code as this is in MIPS. Also make the code neat: line up

icon
Related questions
Question

This is Computer Machine Architecture! this is Hamming code in MIPS assembly language

1. when I input a 154 (the example in the book).  It should have given an output of 0x72A.

the assignment:

This assignment is to create a MIPS programs that the determines what the ECC code should given number (an 8-bit byte).  The codes you create are to work for 8-bit positive numbers as these are simpler to work with than larger numbers.

The program is to request the user to enter a byte of data (a positive integer in the range of 0 to 255 in decimal) and then create the 12-bit Hamming code as described in your text (see above). The program is to then output this (with an appropriate label) in hex.

Make sure that you have lots of comments in your code as this is in MIPS. Also make the code neat: line up the instruction columns, the register columns, and the comment fields like the format below

Assignment9.asm
File Edit View
#MIPS Floating point examples
#by Philip Lamb
#
# Add
# Subtract
Ln 1, Col 1
37°F
Cloudy
li
$v0, 4
la $a0, inputMesg2
syscall
li
$v0, 6
syscall
S.S $f0, secondNum
li $v0, 4
# Get display message code
la $a0, inputMesg1 # Get input message address
syscall
# Display the message
li
$v0, 6
#input floating point number code
syscall
S.S $fØ, firstNum
add.s $f6, $f2, $f4
S.S
$f6, FPSum
li
$v0, 4
la $a0, sumMesg
syscall
1.s
li
syscall
$f12, FPSum
$v0, 2
FloatingPointArithematic.asm
1.s
$f2, firstNum # Set up $f2 and $f4 with input numbers
1.s $f4, second Num
sub.s $f8, $f2, $f4
S.S $f8, FPDiff
# Input the number
# Save the input number
# Get display message code
# Get input message address
# Display the message
# input floating point number code
# Input the number
# Save the input number
# single precision add
# Save sum
X
# Get display message code
# Get message address
# Display the sum message
# Get the sum
+
# single precision sub
# Save difference
# Display floating point number code
# Display the sum
T
■
Q Search
100%
Unix (LF)
UTF-8
1x
16
x
1:12 PM
4/21/2023
Transcribed Image Text:Assignment9.asm File Edit View #MIPS Floating point examples #by Philip Lamb # # Add # Subtract Ln 1, Col 1 37°F Cloudy li $v0, 4 la $a0, inputMesg2 syscall li $v0, 6 syscall S.S $f0, secondNum li $v0, 4 # Get display message code la $a0, inputMesg1 # Get input message address syscall # Display the message li $v0, 6 #input floating point number code syscall S.S $fØ, firstNum add.s $f6, $f2, $f4 S.S $f6, FPSum li $v0, 4 la $a0, sumMesg syscall 1.s li syscall $f12, FPSum $v0, 2 FloatingPointArithematic.asm 1.s $f2, firstNum # Set up $f2 and $f4 with input numbers 1.s $f4, second Num sub.s $f8, $f2, $f4 S.S $f8, FPDiff # Input the number # Save the input number # Get display message code # Get input message address # Display the message # input floating point number code # Input the number # Save the input number # single precision add # Save sum X # Get display message code # Get message address # Display the sum message # Get the sum + # single precision sub # Save difference # Display floating point number code # Display the sum T ■ Q Search 100% Unix (LF) UTF-8 1x 16 x 1:12 PM 4/21/2023
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS