Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Translate the following source code into a machine code using the assembly language of LMC and complete the table below. Var i=0; var j=1; var

Translate the following source code into a machine code using the assembly language of LMC and complete the table below. Var i=0; var j=1; var k=0; while(k<4) { var fib=i+j; i=j; j=fib; print(i); k=k+1; } 01 ? LDA 20 ;load k 02 ? ? ;k-4 03 717 ? ;Branch if equal to zero 04 ? ? ;load i 05 ? ? ; i+j 06 ? ? ;Store into fib 07 ? ? ;load j 08 ? ? ; Assign j to i (i=j) 09 ? ? ; load fib 10 ? ? ; Assign fib to j (j=fib) 11 ? ? ; load i 12 ? ? ; print into out basket 13 ? ? ;load k 14 ? ? ;k=k+1 15 ? ? ;store to k 16 ? ? ;load to the first 17 000 HLT ;end of the program 18 DAT 00 000 ;var i 19 DAT 00 001 ;var j 20 DAT 00 000 ;var k 21 DAT 00 100 ; const =4 22 DAT 00 000 ;fib=0 23 DAT 00 001 ;const =1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

=+ Does this site have scientific, medical, or legal advice?

Answered: 1 week ago

Question

3. What changes should I be making?

Answered: 1 week ago

Question

2. Why?

Answered: 1 week ago