Question: Write a Little Man program that accepts three values as input and outputs them in order of size, largest to smallest. Use the following LMC
Write a Little Man program that accepts three values as input and outputs them in order of size, largest to smallest.
Use the following LMC instruction set :
| Arithmetic | 1xx | Add |
| 2xx | Subtract | |
| Data movement | 3xx | store |
| 5xx | load | |
| Jump | 6xx | BR |
| Branch on zero | 7xx | BRZ |
| Branch on positive | 8xx | BRP |
| Input | 901 | Input |
| Output | 902 | Output |
| End | 000 | Halt |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
