Question: Ch02.12 Suppose that a new MIPS instruction, called bcp, was designed to copy a block of words from one address to another. Assume that this

Ch02.12 Suppose that a new MIPS instruction, called bcp, was designed to copy a block of words from one address to another. Assume that this instruction requires that the starting address of the source block be in register $t1 and that the destination address be in $t2. The instruction also requires that the number of words to copy be in $t3 (which is > 0). Furthermore, assume that the values of these registers as well as register $t4 can be destroyed in executing this instruction (so that the registers can be used as temporaries to execute the instruction).

li $t1, src

li $t2, dst

li $t3, count

bcp

Do the following: Write the MIPS assembly code to implement a block copy without this bcp instruction. Estimate the total cycles necessary for each realization to copy 100-words on the multicycle machine, assuming each instruction takes 1 cycle.

2.5 Write the code for the following MIPS binary instructions:

a) 0x01098020

b) 0x000DB940

c) 0xAD620004

d) 0x0810000c

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!