Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started