Answered step by step
Verified Expert Solution
Link Copied!

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 x3000 MAIN JSR GETHD JSR GETHD HALT GETHD ST R7, NUM1 ST R1, NUM2 START GETC ST R0, NUM3 LD R1, SUB_48 ADD R0, R0, R1 BRN START BRZ L_OK_2 ADD R0, R0,-9 BRNZ L_OK_2 LD R0, NUM3 LD R1, SUB_65 ADD R0, R0, R1 BRN START BRZ L_OK_1 ADD R0, R0,-5 BRNZ L_OK_1 LD R0, NUM3 LD R1, SUB_97 ADD R0, R0, R1 BRZ L_OK_1 BRN START ADD R0, R0,-5 BRP START BRNZ L_OK_1 L_OK_1 LD R0, NUM3 OUT LD R1, SUB_55 ADD R0, R0, R1 BRNZP RETURN L_OK_2 LD R0, NUM3 OUT LD R1, SUB_48 ADD R0, R0, R1 BRNZP RETURN L_OK_3 LD R0, NUM3 OUT LD R1, SUB_87 ADD R0, R0, R1 BRNZP RETURN RETURN LD R7, NUM1 LD R1, NUM2 RET NUM1.fill 0 NUM2.fill 0 NUM3.fill 0 SUB_65.fill -65 SUB_87.fill -87 SUB_97.fill -97 SUB_55.fill -55 SUB_48.fill -48 Please fix the following, there might be a small error, because it works but does not work for these combinations of "user input": R0 does not contain the expected value using input sequence: dd. R0 does not contain the expected value using input sequence: !"\#F:;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started