SIM4 Practice practice quiz 2                 



1. Write a SIM4 assembly language main program main() which reads two integers into %r1 
   and %r2, calls the function %r0=max(%r1,%r2), and prints the result in %r0. 

   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
 
   
 2. Write the SIM4 assembly language function %r0=max(%r1,%r2) which sets %r0 equal to the maximum of 
    %r1 and %r2
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________
   
   ____________________________________