Question: # Tell assembler to not insert instructions to fill branch delay slots. # This is necessary when branch delay slots are disabled. .set noreorder .global

# Tell assembler to not insert instructions to fill branch delay slots.

# This is necessary when branch delay slots are disabled.

.set noreorder

.global _start

_start:

jal main

li $v0, 10

syscall # Use syscall 10 to stop simulation

main:

# call printArray(A[]), n);

# call printArray(B[], n);

#calculate the dot product by calling function

#dp = dotProduct(A, B, n);

#print the result dp to the terminal

printArray: #void printArray(int A[], int n)

#make sure you have a functional print array function

dotProduct: #int dotProduct(int A[], int B[], int n)

#make sure you have a functional dotProduct function

.data

#declare A[] and B[] with the values A = {5,4,3,2,1} B = {1,2,3,4,5}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!