Question: The following question based on MIPS assembly language. Generate the hexadecimal object machine code for each line in the following MIPS source program. (Use the
The following question based on MIPS assembly language.

Generate the hexadecimal object machine code for each line in the following MIPS source program. (Use the Green reference card) Values are decimal numbers. Show work. ( For example: sub $s4. $s2, $s1 = 0251 A022 ) text 1020 # subroutine for memory copy of a string from A to B # index to the next character to copy # sl has address of A # get the next character # s3 has the address of B # copy it # if it is null character, then finished # increment the index # continue the copy # return from the subroutine globl strepy strcpy: add $t0, $zero. $zero loop: add $s1. St0, Sa0 lb $t2, 0(Ss1) add $s3, St0, Sal sb t2, 0(Ss3) beg St2. Szero, finish addi $t0, $t0.1 loop finish: jr Sra
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
