![subject](/tpl/images/cats/informatica.png)
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](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
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
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](/tpl/images/cats/fizika.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 25.09.2020 03:01
![Konu](/tpl/images/cats/en.png)
English, 25.09.2020 03:01
![Konu](/tpl/images/cats/mat.png)
Mathematics, 25.09.2020 03:01
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/biologiya.png)
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 25.09.2020 03:01
![Konu](/tpl/images/cats/en.png)
English, 25.09.2020 03:01