Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assembly Program that will: Load program at x3000 Prompt for Number (1 9) Output : negative of that number Example: Please input a number from

Assembly Program that will:

Load program at x3000

Prompt for Number (1 9)

Output: negative of that number

Example:

Please input a number from 1 9:

>> 5 (User inputs a 5)

Negative value: -5

this needs to be written in lc3

; coRY WINDHAM 2810-001

; THIS PROGRAM PROMPTS USER FR NUMBER 1-9 THEN FLIPS THAT INPUT NEGATIVE

.ORIG X3000

; intro string and instructions

LEA R0, INTRO1

PUTS

LEA R0, INTRO2

PUTS

; get user input

IN ; get user input

;output value

LEA R0, OUTPUT

PUTS

HALT

INTRO1 .STRINGZ "THIS PROGRAM TAKES YOUR NUMBER AND MAKES IT NEGATOVE. "

INTRO2 .STRINGZ "PLEASE ENTER A NUMBER BETWEEN 1 AND 9. "

OUTPUT .STRINGZ "NEGATIVE VALUE"

.END

this is what I have

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 Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

More Books

Students also viewed these Databases questions

Question

What are some of the hiring standards to avoid?

Answered: 1 week ago

Question

What are some metrics for evaluating recruitment and selection?

Answered: 1 week ago