Consider the following program in MARIE assembly language. Complete the table detailing the RTN for next...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following program in MARIE assembly language. Complete the table detailing the RTN for next 3 instructions only that will be executed including the content of registers PC, IR, MAR, MBR and AC in hexadecimal. Note the first instruction LOAD X is already filled. Note also that SKIPCOND instruction has no operands, therefore you can complete Fetch, decode and execute cycles only. Explain in one statement what is this program doing? (14 points) ORG 000 LOAD X Repeat, ADD One End, X, One, SKIPCOND 000 JUMP End STORE X JUMP Repeat STORE X HALT DEC -10 DEC 1 Instruction Load X Step Fetch Decode Get operand execute / AC = X / AC = X + 1 / if AC < 0 then PC = PC + 1 (skip) / Go to End / X = AC / Go to Repeat / Stop (end of program) RTN PC IR MAR MBR AC 000 0000 000 0000 0000 000 1008 000 0000 0000 001 1007 000 0000 0000 MAR PC IR M[MAR] PC PC + 1 Decode OPCODE IR [15-12]=0001 001 1007 000 => Load MARIR[11-0] MBR M[MAR] ACMBR 0000 0000 001 1007 008 0000 0000 001 1007 007 FFF6 0000 001 1007 007 FFF6 FFF6 Add One Skipcond 000 Jump End Fetch Decode Get Operand execute Fetch Decode Get Operand execute Fetch Decode Get Operand execute Consider the following program in MARIE assembly language. Complete the table detailing the RTN for next 3 instructions only that will be executed including the content of registers PC, IR, MAR, MBR and AC in hexadecimal. Note the first instruction LOAD X is already filled. Note also that SKIPCOND instruction has no operands, therefore you can complete Fetch, decode and execute cycles only. Explain in one statement what is this program doing? (14 points) ORG 000 LOAD X Repeat, ADD One End, X, One, SKIPCOND 000 JUMP End STORE X JUMP Repeat STORE X HALT DEC -10 DEC 1 Instruction Load X Step Fetch Decode Get operand execute / AC = X / AC = X + 1 / if AC < 0 then PC = PC + 1 (skip) / Go to End / X = AC / Go to Repeat / Stop (end of program) RTN PC IR MAR MBR AC 000 0000 000 0000 0000 000 1008 000 0000 0000 001 1007 000 0000 0000 MAR PC IR M[MAR] PC PC + 1 Decode OPCODE IR [15-12]=0001 001 1007 000 => Load MARIR[11-0] MBR M[MAR] ACMBR 0000 0000 001 1007 008 0000 0000 001 1007 007 FFF6 0000 001 1007 007 FFF6 FFF6 Add One Skipcond 000 Jump End Fetch Decode Get Operand execute Fetch Decode Get Operand execute Fetch Decode Get Operand execute
Expert Answer:
Related Book For
Discrete and Combinatorial Mathematics An Applied Introduction
ISBN: 978-0201726343
5th edition
Authors: Ralph P. Grimaldi
Posted Date:
Students also viewed these general management questions
-
Consider the following program segment, where i, j, k, n, and counter are integer variables and the value of n (a positive integer) is set prior to this segment. counter : = 0 for i : = 1 to n do for...
-
Consider the following program in Scheme: What does this programprint? What would it print if Scheme used dynamic scoping and shallow binding? Dynamic scoping and deep binding? Explain your answers....
-
Consider the following program written in C syntax: For each of the following parameter- passing methods, what are all of the values of the variables value and list after each of the three calls to...
-
Ninna Company manufactures wooden shelves. An accountant for Ninna just completed the variance report for the current month. After printing the report, his computers hard drive crashed, effectively...
-
In what ways have smart phones that incorporate wireless technologies changed the business landscape?
-
Which flowcharting symbol indicates the start or end of a process? a. Arrow. b. Diamond c. Oval. d. Rectangle.
-
Define and distinguish among subject matter, personal, and in rem jurisdiction.
-
The County of Maxnell decides to create a sanitation department and offer its services to the public for a fee. As a result, county officials plan to account for this activity within the enterprise...
-
Question 2 ( 2 points ) Barnes Corp. issues $ 8 0 0 , 0 0 0 of 9 % , 2 0 - year bonds. The bonds are dated January 1 , 2 0 1 1 , and are due in 2 0 years on January 1 , 2 0 3 1 . Interest is paid...
-
1 Alta Electronics 2 3 4 5 Solution value 6 Selling price per unit 7 Material cost per unit 8 Labor cost per unit 15 9 Profit 10 Constraints 10 Cor 11 Department 1 Dep 12 Department 2 13 Department 3...
-
Determine the headwater depth (HW) of a 900 mm diameter concrete pipe culvert operating under inlet control with a streamflow of 1.95 m3/s. The culvert is a headwall and grooved edge. If the entrance...
-
In Problems 35-39, suppose that, for a certain mathematics class, the scores are normally distributed with a mean of 75 and a standard deviation of 8. The teacher wishes to give A's to the top \(6...
-
What percent of the total population is found between the mean and the z-score given in Problems 11-22? \(z=-0.50 \)
-
The amount of electricity used in a typical all-electric home is shown in the circle graph in Figure 14.15. If, in a certain month, a home used 1,100 kWh (kilowatt-hours), find the amounts of...
-
Decide whether something is wrong with each of the graphs shown in Problems 13-17. Explain your reasoning. Consider the graph shown in Figure 14.20. Chevy trucks are clearly better. 95% CHEVY FORD...
-
Refer to P46. During 2008, the following events occurred: 1. Silly Inc. had sales of $800,000 to Practical Corp. Sillys gross margin was still 40% of selling price, and its income tax rate continued...
-
Warren Buffett has reportedly said: "Investment is the process of putting out money today to get more money back at some point in the future. And the question is, how far in the future, how much...
-
Research corporate acquisitions using Web resources and then answer the following questions: Why do firms purchase other corporations? Do firms pay too much for the acquired corporation? Why do so...
-
Provide the proofs for the remaining parts of Theorems 6.1 and 6.2.
-
Jerry tosses a fair coin six times. What is the probability he gets (a) All heads. (b) One head. (c) Two heads. (d) An even number of heads. (e) At least four heads?
-
Let v, w be two vertices in Kn, n 3. How many walks of length 3 are there from v to w?
-
Consider a second-order system whose transfer function is in standard form as in Equation 10.7. Assume that the requirements for the system unit-step response are rise time \(t_{\mathrm{r}} \leq 0.1...
-
The transfer function of a dynamic system is given by \[G(s)=\frac{s+4}{s^{5}+2 s^{4}+3 s^{3}+8 s^{2}+4 s+5}\] Determine the stability of the system a. Using Routh's stability criterion without...
-
Consider an unstable plant \[G(s)=\frac{s+2}{s^{3}+4 s^{2}-5 s}\] with feedback control, as shown in Figure 10.15. a. Using Routh's stability criterion, determine the range of the control gain \(K\)...
Study smarter with the SolutionInn App