Question: Compare AB, AC, BC, winner gets one point each time. As you get a point you shift your address in memory (become second, third as

Compare AB, AC, BC, winner gets one point each time. As you get a point you shift your address in memory (become second, third as you realize you are greater).

______________

LOAD firstaddr

STORE winsA

STORE winsB

STORE winsC

__________________

INPUT

STORE A

INPUT

STORE B

INPUT

STORE C

____________________

compareAB, LOAD A

SUBT B

SKIPCOND 000

JUMP AGB

LOAD winsB

ADD One

STORE winsB

JUMP compareAC

___________________

AGB, LOAD winsA

ADD One

STORE winsA

____________________

compareAC, LOAD A

SUBT C

SKIPCOND 000

JUMP AGC

LOAD winsC

ADD One

STORE winsC

JUMP compareBC

_________________

AGC, LOAD winsA

ADD One

STORE winsA

___________________

compareBC, LOAD B

SUBT C

SKIPCOND 000

JUMP BGC

LOAD winsC

ADD One

STORE winsC

JUMP print

___________________

BGC, LOAD winsB

ADD One

STORE winsB

___________________

print, LOAD A

STOREI winsA

LOAD B

STOREI winsB

LOAD C

STOREI winsC

_____________________

LOAD first

OUTPUT

LOAD second

OUTPUT

LOAD third

OUTPUT

___________________

HALT

_________________

winsA, hex 0

winsB, hex 0

winsC, hex 0

A, DEC 0

B, DEC 0

C, DEC 0

first, dec 0

second, dec 0

third, dec 0

One, DEC 1

firstaddr, hex 03E

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!