Question: LC3 assembly code: PLease explain your answer . Thanks Question 2: You have to provide a simple interface that allows users to specify any of
LC3 assembly code:

PLease explain your answer . Thanks
Question 2: You have to provide a simple interface that allows users to specify any of three operations they wish to perform on a pair of integers x,y entered by the user. The three operations are (a) Addition, (b) Subtraction (first number - second number), and (c) multiplication. Do you think using subroutines makes your code more modular and easier to scale? Assume that x and y are each less than 1000 and are positive integers. You will need to convert ASCII to Binary The specifications for thep Your program must start at address x3000 The program should first print out a greeting "Starting Program" and then o Prompt user for input x: "Enter number x" o It should read this number and store it at address x5100 o Next, prompt user for input y: Enter number y" o It should read this number and store it at address x5101 The program then prompts the user for 4 inputs: "Enter operation A, S, M or X" (Can you make these commands case insensitive so that the user can enter A or a to select addition? Think about how you can add this option.) . After the prompt, the User enters one of these input. If they enter an invalid value (i.e., something other than A, S, or M) then the program prints out Invalid Operation-Try Again" and waits for correct entry If the user enters A, then the program adds the two numbers (i.e., computes x+y) stores the result in memory location x5102, and then goes back to the start and prompts .If the user enters S, then the program subtracts y from x (i.e., computes x -y) stores the result in memory location x5102, and then goes back to the start and prompts user for the next operation. If the user enters M, then the program multiplies the two numbers (i.e., computes x*y) stores the result in memory location x5102, and then goes back to the start and prompts user for next operation. If the user enters X, then the program Halts after printing the message Exiting program" Question 2: You have to provide a simple interface that allows users to specify any of three operations they wish to perform on a pair of integers x,y entered by the user. The three operations are (a) Addition, (b) Subtraction (first number - second number), and (c) multiplication. Do you think using subroutines makes your code more modular and easier to scale? Assume that x and y are each less than 1000 and are positive integers. You will need to convert ASCII to Binary The specifications for thep Your program must start at address x3000 The program should first print out a greeting "Starting Program" and then o Prompt user for input x: "Enter number x" o It should read this number and store it at address x5100 o Next, prompt user for input y: Enter number y" o It should read this number and store it at address x5101 The program then prompts the user for 4 inputs: "Enter operation A, S, M or X" (Can you make these commands case insensitive so that the user can enter A or a to select addition? Think about how you can add this option.) . After the prompt, the User enters one of these input. If they enter an invalid value (i.e., something other than A, S, or M) then the program prints out Invalid Operation-Try Again" and waits for correct entry If the user enters A, then the program adds the two numbers (i.e., computes x+y) stores the result in memory location x5102, and then goes back to the start and prompts .If the user enters S, then the program subtracts y from x (i.e., computes x -y) stores the result in memory location x5102, and then goes back to the start and prompts user for the next operation. If the user enters M, then the program multiplies the two numbers (i.e., computes x*y) stores the result in memory location x5102, and then goes back to the start and prompts user for next operation. If the user enters X, then the program Halts after printing the message Exiting program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
