Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following is a question I'm struggling with using the LC-3 simulator. Thank you! Modify the program so it can add two numbers between 0

The following is a question I'm struggling with using the LC-3 simulator. Thank you!

Modify the program so it can add two numbers between 0 and 9 and handle up to 9 + 9 as input and output up to 18. Then, further modify it to handle two digit operands and a sum <= 198.

.ORIG x3000 ; ; IN ; LD R3, HEXN30 ; ADD R0, R0, R3 ADD R1, R0, x0 ; IN ; ADD R0, R0, R3 ; ; ADD R2, R0, R1 ; ; LEA R0, MESG ; PUTS ; ADD R0, R2, x0 ; LD R3, HEX30 ; ADD R0, R0, R3 OUT ; ; HALT ; ; MESG .STRINGZ "The sum of those two numbers is: " HEXN30 .FILL xFFD0 ; HEX30 .FILL x0030 ; .END

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

Practical Oracle8I Building Efficient Databases

Authors: Jonathan Lewis

1st Edition

0201715848, 978-0201715842

More Books

Students also viewed these Databases questions

Question

What should the strategy of Edward Marshall Boehm be?

Answered: 1 week ago