Question: Use the multiply subroutine you wrote for the Assembly Language quiz and write an assembly language program to implement a new function called MultiAdd. The

Use the multiply subroutine you wrote for the Assembly Language quiz and write an assembly
language program to implement a new function called MultiAdd. The MultiAdd function takes
three parameters, say x,Y, and Z and returns the result x**Y+Z. The MultiAdd function must
use the Multiply function to get the product term in the expression. Use 5**4+10 as your test
data (you should get 30).
This was my assembly langauage program : ORG 100
Input
Store A
Input
Store B
Input
Store C
Input
Store D
Load A
Store X
Load B
Store Y
Call Multiply
Load Result
Store AB_Result
Load C
Store X
Load D
Store Y
Call Multiply
Load Result
Store CD_Result
Load AB_Result
Add CD_Result
Output
Halt
Multiply,
Load Zero
Store Result
Load X
Store Temp
Loop,
Load Temp
Subtract One
Store Temp
Skipcond 800
JumpZ EndLoop
Load Y
Add Result
Store Result
Jump Loop
EndLoop,
Load Result
JumpI Multiply
A,0
B,0
C,0
D,0
X,0
Y,0
Result, 0
Temp, 0
AB_Result, 0
CD_Result, 0
Zero, 0
One, 1
 Use the multiply subroutine you wrote for the Assembly Language quiz

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!