Question: help with LC3 assembly program. i need to output whatever number a user inputs ( i am guessing the largest number a user can enter

help with LC3 assembly program.

i need to output whatever number a user inputs ( i am guessing the largest number a user can enter is 5 digits): i wrote this code but it's wrong:

.ORIG x3000 Lea R1, array AND R3, R3, #0 AND R2, R2, #0 Lea R0, Prompt PUTS loop getc ADD R5,R0, #-10 BRz done out str R0, R1, #0 add R3, R3, #1 add R1, R1, #1

Ld R6, EDA add R4, R3, R6

brn loop done add R0, R0, #10 out lea R0, array PUTS HALT Prompt .Stringz "Enter a number: " array .BLKW 15 #0 EDA .FILL #-14 .end

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!