Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the LMC program which reads in three numbers (one at a time) and places them in memory locations 15, 16, and 17 symbolically denoted

Write the LMC program which reads in three numbers (one at a time) and places them in memory locations 15, 16, and 17 symbolically denoted by variables a, b, and c, respectively. The LMC program should subtract the first two numbers and add the third number to the difference (d:=a-b+c). Next the program should store the result in memory location 18, symbolically denoted by variable d, and print it out. Write the LMC instructions in the mnemonic form. Note that your LMC program will actually implement the following statements written in C# pseudocode below. int a,b,c,d; read a, b, c; d:=a-b+c; print d; address LMC instructions (use mnemonics)

00 IN

01

02

03

04

05

06

07

08

09

10

11

.

.

15 DAT .

16 DAT .

17 DAT .

18 DAT .

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

Step: 3

blur-text-image

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 Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

Find i0 in the circuit in Fig. 3.59. Figure 3.59 162 2i 4 A 0 2 4

Answered: 1 week ago