Question 1:
a) Assume that B is an array of 50 words; write a code which will place the smallest integer of array B in register AX.
b) Write a small code (only three instructions) to multiply the content of BX by 9 without using mul or imul instructions. Assume unsigned words.
c) Translate and optimize the following expressions into assembly language.
i. IF (A>X AND A<3) THEN A=A/Y (assume variables are signed words)
ii. IF ((X!=10) OR (Y>6 AND Z<15))
THEN Z=Y
ELSE Z=X
Question 2:
a) Write a complete program using floating-point operations in Reverse Polish Notation to calculate and display the surface area of a cylinder. The formula is
A sample run would look like:-
Enter radius: 6.5
Enter height: 10.5
Surface area of the cylinder: 694.291