Question: Write a little man computer that accepts three values as input and outputs them in order of size, largest to smallest. Here is code that

Write a little man computer that accepts three values as input and outputs them in order of size, largest to smallest.

Here is code that I have that accepts three values and outputs the largest. Can you modify this code so that it outputs all 3 values in order of size, largest to smallest?

00 INP

01 STA 20

02 INP

03 STA 21

04 INP

05 STA 22

06 LDA 20

07 SUB 21

08 BRP 11

09 LDA 21

10 BRA 12

11 LDA 20

12 STA 23

13 SUB 22

14 BRP 17

15 LDA 22

16 BRA 18

17 LDA 23

18 OUT

19 HLT

20 DAT 00

21 DAT 00

22 DAT 00

23 DAT 00

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!