Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 1 i r 2 start: in r 1 , #Read an input value into register r 1 # Check if the entered number is

11ir2
start: in r1, #Read an input value into register r1
# Check if the entered number is negative or positive
sub r3r0r1#r3-0-r1(Check if r1 is negative)
bge r38updateHighest #update highest number
blt r3 &start #If r1 is positive, go back to start to keep asking
bge r38printHigh #If r1 is negative, go to printHigh to output and stop
updateHighest:
add r2r2r1
printHigh: out r2 #Output the entered number (highest positive or zero)
. halt , #Halt the program
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What were the issues and solutions proposed by each team?

Answered: 1 week ago

Question

Were all members comfortable brainstorming in front of each other?

Answered: 1 week ago

Question

5. What information would the team members need?

Answered: 1 week ago