Convert the following C program into MIPS assembly code Ass

. Convert the following C program into MIPS assembly code. Assume that the variables i,j,k, and m are stored in $s0,$s1,$s2, and $s3 respectively.

i f ( j >= i )

k = j ;

e l s e

k = m;

Solution

bge $s1,$s0,endif #if j>= i goto to endif

move $s2,$s3 #if false k=m

endif:

move $s2,$s1 #if j>=i is true then k=j

. Convert the following C program into MIPS assembly code. Assume that the variables i,j,k, and m are stored in $s0,$s1,$s2, and $s3 respectively. i f ( j >=

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site