In MIPS:
Write an assembly program that reads two lists of floating point numbers A and B from users, and displays the measures given above on the simulator’s console. The program’s specifications are given below:
• Each input vector should be of size 10, i.e., N=10
• The program should use PROCEDURES to compute dot product.
Sample input vectors: A = [0.11 0.34 1.23 5.34 0.76 0.65 0.34 0.12 0.87 0.56]
B = [7.89 6.87 9.89 7.12 6.23 8.76 8.21 7.32 7.32 8.22]
The program’s output should be similar to given in the following:
The dot product of A and B = 78.45
Hello user, I will answer your question gladly :D
And here is some output I got, using the example in the statement:
And here is the functional code:
.data
asking1: .asciiz "\Enter the 10 float numbers of vector A(one line each):\n"
asking2: .asciiz "\Enter the 10 float numbers of vector B(one line each):\n"
arrayA: .float 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
arrayB: .float 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
aux: .float 0.0
.text
main:
la $a0,asking1
li $v0, 4 #loads the value 4 into register $v0 which is the op code for print string
syscall #reads register $v0 for op code, sees 4 and prints the string located in $a0
la $a0,arrayA
li $t0,0
li $t1,10
cycle1:
li $v0, 6 #loads the value 6 into register $v0 which is the op code for read float
syscall #reads register $v0 for op code, reads and saves the float in $f0
swc1 $f0,0($a0)
addi $a0,$a0,4
addi $t0,$t0,1
bne $t0,$t1,cycle1
#else
la $a0,asking2
li $v0, 4 #loads the value 4 into register $v0 which is the op code for print string
syscall #reads register $v0 for op code, sees 4 and prints the string located in $a0
la $a0,arrayB
li $t0,0
li $t1,10
cycle2:
li $v0, 6 #loads the value 6 into register $v0 which is the op code for read float
syscall #reads register $v0 for op code, reads and saves the float in $f0
swc1 $f0,0($a0)
addi $a0,$a0,4
addi $t0,$t0,1
bne $t0,$t1,cycle2
jal dot_product
li $v0, 10 #exit
syscall
dot_product:
la $a0,arrayA
la $a1,arrayB
la $a2,aux
lwc1 $f12,0($a2)
li $t0,0
li $t1,10
cycle:
lwc1 $f0,0($a0)
lwc1 $f1,0($a1)
mul.s $f3,$f0,$f1
add.s $f12,$f12,$f3
addi $a0,$a0,4
addi $a1,$a1,4
addi $t0,$t0,1
bne $t0,$t1,cycle
li $v0, 2
syscall
jr $ra
In MIPS: Write an assembly program that reads two lists of floating point numbers A and...
Write a MIPS program that will ask the user to enter two floating point numbers at the console and pass the values to a function that does multiplication
1. Write a program in Assembly language using MIPS instruction set that reads two integer numbers from the user named as start and end number and finds out all the prime numbers between start and end (including start and end). Your program should do the validation of both the numbers as follows: i. start number must be smaller or equal to the end number. ii. Both numbers must be positive. iii. The maximum value for the end number is 10000...
Computer Architecture Project Description: farh-to-cel.asm : # Revised and added code taken from Hennesey and Patterson 5th edition # to work with this simulator. # # Prompts a user to enter a Fahrenheit temperature as a floating point. # Displays the converted temperature in Celcius. # 10/28/2015 .data const5: .float 5.0 # store a floating point constant 5.0 const9: .float 9.0 const32: .float 32.0 .align 2 # align the next string on a word boundary .space 100 prompt: .asciiz "Please...