Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write an assembly program to evaluate the following expression for this CPU. Ignore the remainder part of the division process and assume the multiplication
Write an assembly program to evaluate the following expression for this CPU. Ignore the remainder part of the division process and assume the multiplication result is 16 bit instead of 32 bit. X = ( (a + b) / (a + c)) (100 * a) The instruction set of this processor consists of the following instructions: ADD Ri, Rj, Rk MUL Ri, Rj, Rk DIV Ri, Rj, Rk MOVE Ri, #100 LOAD Ri, M[X] STORE M[X], Ri ; add Rj to Rk and put result in Ri ; multiply Rj by Rk and put result in Ri ; divide Rj by Rk and put result in Ri ; move constant value %23100 in Ri ; load (copy) content of Memory at address X into Ri ; store (copy) Ri into Memory location at address X Note that in the equation above a = M[A]. It represents content of memory location at address A. Same applies for B, C, X.
Step by Step Solution
★★★★★
3.41 Rating (151 Votes )
There are 3 Steps involved in it
Step: 1
Steps to evaluate the expression xabac100a on the given CPU Load the values of a b and c into registers Add a and b and store the result in a register Add a and c and store the result in a register Di...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