Question: ***I really need the bonus one too so that I can get extra points. Objective Create a LC-3 program that will perform addition (optionally more


***I really need the bonus one too so that I can get extra points.
Objective Create a LC-3 program that will perform addition (optionally more operations) on numbers with 4 digits or less Problem Statement We are now familiar with the LC-3 simulator and can debug and develop asm code. For this assignment, you are to develop a LC-3 assembly program to perform math operations and display the result on the screen A skeleton code is NOT provided to you. You are to develop your own program to accomplish this task. Feel free to refer to previous labs for ideas. The requirement for the lab is to ask the user to enter two numbers of up to four digits in length and display their sum. The expected program output is shown below Please enter SRC1: 1234 Please enter SRC2: 4321 The sumis Two references you might find useful for this lab are the ASCII table and the LC-3 instructions guide (on Blackboard). Bonus You can gather more points by adding extra operations and building a calculator. Each additional operation is worth extra 15 points. Multiplication (Extra 15 points) You can modify your code to offer multiplication as an option. Recall that we discussed how we can multiply numbers by adding them repeatedly You are only responsible for results with up to 4 digits. Subtraction (Extra 15 points) Modify your code to allow subtraction of two 4-digit numbers For receive full credit, you should display for negative results as well. Test case: 1050 1200 -150 Division (Extra 15 points) Modify your code to allow for division Recall that we can divide numbers by repeated subtraction or by using bit-shifting Test case: 400 / 99-4 Objective Create a LC-3 program that will perform addition (optionally more operations) on numbers with 4 digits or less Problem Statement We are now familiar with the LC-3 simulator and can debug and develop asm code. For this assignment, you are to develop a LC-3 assembly program to perform math operations and display the result on the screen A skeleton code is NOT provided to you. You are to develop your own program to accomplish this task. Feel free to refer to previous labs for ideas. The requirement for the lab is to ask the user to enter two numbers of up to four digits in length and display their sum. The expected program output is shown below Please enter SRC1: 1234 Please enter SRC2: 4321 The sumis Two references you might find useful for this lab are the ASCII table and the LC-3 instructions guide (on Blackboard). Bonus You can gather more points by adding extra operations and building a calculator. Each additional operation is worth extra 15 points. Multiplication (Extra 15 points) You can modify your code to offer multiplication as an option. Recall that we discussed how we can multiply numbers by adding them repeatedly You are only responsible for results with up to 4 digits. Subtraction (Extra 15 points) Modify your code to allow subtraction of two 4-digit numbers For receive full credit, you should display for negative results as well. Test case: 1050 1200 -150 Division (Extra 15 points) Modify your code to allow for division Recall that we can divide numbers by repeated subtraction or by using bit-shifting Test case: 400 / 99-4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
