Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!