Answered step by step
Verified Expert Solution
Question
1 Approved Answer
. orig x 3 0 0 0 MAIN JSR GETHD JSR GETHD HALT GETHD ST R 7 , NUM 1 ST R 1 , NUM
orig x MAIN JSR GETHD JSR GETHD HALT GETHD ST R NUM ST R NUM START GETC ST R NUM LD R SUB ADD R R R BRN START BRZ LOK ADD R R BRNZ LOK LD R NUM LD R SUB ADD R R R BRN START BRZ LOK ADD R R BRNZ LOK LD R NUM LD R SUB ADD R R R BRZ LOK BRN START ADD R R BRP START BRNZ LOK LOK LD R NUM OUT LD R SUB ADD R R R BRNZP RETURN LOK LD R NUM OUT LD R SUB ADD R R R BRNZP RETURN LOK LD R NUM OUT LD R SUB ADD R R R BRNZP RETURN RETURN LD R NUM LD R NUM RET NUMfill NUMfill NUMfill SUBfill SUBfill SUBfill SUBfill SUBfill Please fix the following, there might be a small error, because it works but does not work for these combinations of "user input": R does not contain the expected value using input sequence: dd R does not contain the expected value using input sequence: #F:;
orig x MAIN JSR GETHD JSR GETHD HALT GETHD ST R NUM ST R NUM START GETC ST R NUM LD R SUB ADD R R R BRN START BRZ LOK ADD R R BRNZ LOK LD R NUM LD R SUB ADD R R R BRN START BRZ LOK ADD R R BRNZ LOK LD R NUM LD R SUB ADD R R R BRZ LOK BRN START ADD R R BRP START BRNZ LOK LOK LD R NUM OUT LD R SUB ADD R R R BRNZP RETURN LOK LD R NUM OUT LD R SUB ADD R R R BRNZP RETURN LOK LD R NUM OUT LD R SUB ADD R R R BRNZP RETURN RETURN LD R NUM LD R NUM RET NUMfill NUMfill NUMfill SUBfill SUBfill SUBfill SUBfill SUBfill Please fix the following, there might be a small error, because it works but does not work for these combinations of "user input": R does not contain the expected value using input sequence: dd R does not contain the expected value using input sequence: #F:;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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