Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hello I need help with the following problem, it has to be in assembly language. The following are the steps necessary to solve the problem.
Hello I need help with the following problem, it has to be in assembly language.
The following are the steps necessary to solve the problem.
Can someone please help write the code, I am lost so far I have just gotten the part up to the subtraction but the absolute vaue and end I dont know how. Can someone please wite it and explain every line? Thank you very much!
This is what I have so far
.ORIG x3000 LDI R0, X LDI R1, Y
;x-y NOT R3, R1 ADD R3, R3, #1 ADD R4, R0, R4 STI R4 sub
; absolute value x
;absolute value y
ARITHMETIC FUNCTIONS 2.1 Problem Statement The numbers X and Y are found at locations x3120 and x3121, respectively. Write a program in LC-3 assembly language that does the following: . Compute the difference X -Y and place it at location x3122. . Place the absolute values l and P1 at locations x3123 and x3124, respectively . Determine which ofand P1 is larger. Place l at location x3125 if XI is, a 2 ifIYI is, or a 0 if they are equal. 2.1.1 Inputs The integers X and Y are in locations x3120 and x3121, respectively: x3120X x3121Y 2.1.2 Outputs The outputs at their corresponding locations are as follows x31 x3123 x3124Y x3125Z where Z is defined as Revision: I.II, Jamuary 26, 2007 2-1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started