Question: 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.

Hello I need help with the following problem, it has to be

The following are the steps necessary to solve the problem.

in assembly language. The following are the steps necessary to solve theproblem. Can someone please help write the code, I am lost sofar I have just gotten the part up to the subtraction but

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-1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!