subject
Computers and Technology, 28.05.2021 02:30 roibeyj

Write an assembly code to implement the y=(x1+x2)*(x3+x4) expression on 2-address machine, and then display the value of y on the screen. Assume that the values of the variables are known. Hence, do not worry about their values in your code. The assembly instructions that are available in this machine are the following:
Load b, a Load the value of a to b
Add b, a Add the value of a to the value of b and place the result in b
Subt b, a Subtract the value of a from the value of b and place the result in b
Mult b, a Multiply the values found in a and b and place the result in b
Store b, a Store the value of a in b.
Output a Display the value of a on the screen
Halt Stop the program
Note that a or b could be either a register or a variable. Moreover, you can use the temporary registers R1 & R2 in your instructions to prevent changing the values of the variables (x1,x2,x3,x4) in the expression.
In accordance with programming language practice, computing the expression should not change the values of its operand.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:50, wtfcmd
Match the personality traits with their description
Answers: 1
image
Computers and Technology, 23.06.2019 02:00, hctlawton
Which software would you use to create a print design? a. illustrator b. audacity c. reaper d. dreamweaver
Answers: 2
image
Computers and Technology, 23.06.2019 13:30, Gearyjames8
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
image
Computers and Technology, 23.06.2019 19:30, sallybob0
What are loans to a company or government for a set amount of time
Answers: 1
You know the right answer?
Write an assembly code to implement the y=(x1+x2)*(x3+x4) expression on 2-address machine, and then...

Questions in other subjects:

Konu
Mathematics, 25.09.2020 03:01
Konu
Mathematics, 25.09.2020 03:01