Question: Write an LC3 program that includes- a main function (code located at the top of your program)- a function MULT that calculates the product of
Write an LC3 program that includes- a main function (code located at the top of your program)- a function MULT that calculates the product of two non-negative numbers The main function should load two values from variables named FACT1 and FACT2, initialized to 3 and 8. Call MULT using those values, store the result in a variable named PRODUCT.

The function MULT must be a close translation of the code shown below. It must be recursive and make use of the stack for local variables (when saving register values, for example). Use registers to send parameters and There is a simpler recursive version of multiply, but you must implement this one. int mult(int n, int m) if (n-1) else if (m= 1) else return m; return n; return mult (n-1,m-1) +n+m-1; Name your program Mult.asm The function MULT must be a close translation of the code shown below. It must be recursive and make use of the stack for local variables (when saving register values, for example). Use registers to send parameters and There is a simpler recursive version of multiply, but you must implement this one. int mult(int n, int m) if (n-1) else if (m= 1) else return m; return n; return mult (n-1,m-1) +n+m-1; Name your program Mult.asm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
