Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored 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