Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the LMC program that reads in four numbers (one at a time) and places them in memory locations 50, 51, 52, 53 symbolically denoted

Write the LMC program that reads in four numbers (one at a time) and places them in memory locations 50, 51, 52, 53 symbolically denoted by variables a, b, c, and d, respectively, in the C# like program segment below. The LMC program should subtract the second number from the first number and add the third number and the fourth number to the difference (e:=a+b-c-d). Next, the program should store the result in memory location 54, symbolically denoted by variable e, 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 the C# pseudocode below. The LMC instructions start at address 00. int a, b, c, d, e; read a, b, c, d; e:=a+b-c-d; print e; address instruction

00

01

02

03

04

05

06

07

08

09

10

11

.

.

.

.

.

.

50 DAT

51 DAT

52 DAT

53 DAT

54 DAT

What addresses represent the program area and the data area, respectively?

Program area: Data area:

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

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

=+ Of the HR issues mentioned in the case,

Answered: 1 week ago