Question: 1. Write a series of instructions that will multiply two integers under the assumption that the second operand is less than or equal to #7
1. Write a series of instructions that will multiply two integers under the assumption that the second operand is less than or equal to #7 (i.e. requires no more than 3 bits to represent) using only MOV, TST, ADDNE, and LSL operations. Store the operands in R1 and R2 and the result in R0. Since there is no easy way to get user input, work with example values for your operands, e.g. #26 and #5. Don't worry about numerical overflow. Step through your code to demonstrate it works.
2. Modify your program to accept a 16 bit second operand. Use additional registers as needed. Don't worry about numerical overflow. Step through your code to demonstrate it works.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
