Please answer Values 16-20. Complete the following Incomplete LMC program by filling out the vacant mailboxes. The program outputs 3 random numbers taken as inputs in ASCENDING ORDER. Each vacant mailbox has a corresponding item number (i.e. 1,2,3, ..., until 20).

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please answer Values 16-20.

Complete the following Incomplete LMC program by filling out the vacant mailboxes. The program outputs 3 random numbers taken as inputs in ASCENDING ORDER. Each vacant mailbox has a corresponding item number (i.e. 1,2,3, ..., until 20). 

MB# VAL
00 1.
01 2.
02 3.
03 4.
input 1st number
store on loc 80
input 2nd number
store on loc 81
04 280 sub val on 80
05 5.
branch if + when 2nd no. > 1st no.
06 901 input 3rd number (executes when 1st > 2nd)
07
382 store on loc 82
08 280 sub val on 80
09 6.
10 580 load 1st number
11 7. store largest(1st number)
12 581 load 2nd number
13 282 sub 3rd number
14 8.
15 582 load 3rd number
386 store mid
581 load 2nd number
387 store small
658 jump to 58
581 load 2nd number
16
17
18
19
20
21
22
23
24
mnemonics/comments
25
26
branch if + when 3rd no. > 1st no.
387 store small
658 jump to 58
582 load 3rd number
385 store largest(3rd number)
27
580 load 1st number
28 281 sub 2nd number
29 9.
30
31
32
38
39
branch if + when 2nd no. > 3rd no.
386 store mid
582 load 3rd number
branch if + when 2nd no. > 1st no.
580 load 1st number
386 store mid
581 load 2nd number
33 387 store small
34
658 jump to 58
35
581 load 2nd number
store mid
36 10.
580 load 1st number
387 store small
658 jump to 58
1st number is largest
3rd number is largest
MB#
40
41
42
43 11.
44
45
46
47
VAL
mnemonics/comments
901 input 3rd number (executes when 2nd > 1st)
382 store on loc 82
50
51
52
53
54
55
281 sub val on 81
48 12.
49
581 load 2nd number
385 store largest(2nd number)
582 load 3rd number
280 sub 1st number
580 load 1st number
386 store mid
582 load 3rd number
branch if + when 3rd no. > 2nd no.
387 store small
658 jump to 58 (output)
56
57 13.
58 14.
59 15.
60 16.
582 load 3rd number
386 store mid
branch if + when 3rd no. > 1st no.
580 load 1st number
store small
61 17.
62 18,
63 19.
64 20.
80 000
81 000
82 000
85 000
86
000
87
000
COB
1ST NUMBER (DATA STORE)
2ND NUMBER (DATA STORE)
3RD NUMBER (DATA STORE)
LARGEST NUMBER (DATA STORE)
MID NUMBER (DATA STORE)
SMALLEST NUMBER (DATA STORE)
2nd number is largest
OUTPUT
Transcribed Image Text:MB# VAL 00 1. 01 2. 02 3. 03 4. input 1st number store on loc 80 input 2nd number store on loc 81 04 280 sub val on 80 05 5. branch if + when 2nd no. > 1st no. 06 901 input 3rd number (executes when 1st > 2nd) 07 382 store on loc 82 08 280 sub val on 80 09 6. 10 580 load 1st number 11 7. store largest(1st number) 12 581 load 2nd number 13 282 sub 3rd number 14 8. 15 582 load 3rd number 386 store mid 581 load 2nd number 387 store small 658 jump to 58 581 load 2nd number 16 17 18 19 20 21 22 23 24 mnemonics/comments 25 26 branch if + when 3rd no. > 1st no. 387 store small 658 jump to 58 582 load 3rd number 385 store largest(3rd number) 27 580 load 1st number 28 281 sub 2nd number 29 9. 30 31 32 38 39 branch if + when 2nd no. > 3rd no. 386 store mid 582 load 3rd number branch if + when 2nd no. > 1st no. 580 load 1st number 386 store mid 581 load 2nd number 33 387 store small 34 658 jump to 58 35 581 load 2nd number store mid 36 10. 580 load 1st number 387 store small 658 jump to 58 1st number is largest 3rd number is largest MB# 40 41 42 43 11. 44 45 46 47 VAL mnemonics/comments 901 input 3rd number (executes when 2nd > 1st) 382 store on loc 82 50 51 52 53 54 55 281 sub val on 81 48 12. 49 581 load 2nd number 385 store largest(2nd number) 582 load 3rd number 280 sub 1st number 580 load 1st number 386 store mid 582 load 3rd number branch if + when 3rd no. > 2nd no. 387 store small 658 jump to 58 (output) 56 57 13. 58 14. 59 15. 60 16. 582 load 3rd number 386 store mid branch if + when 3rd no. > 1st no. 580 load 1st number store small 61 17. 62 18, 63 19. 64 20. 80 000 81 000 82 000 85 000 86 000 87 000 COB 1ST NUMBER (DATA STORE) 2ND NUMBER (DATA STORE) 3RD NUMBER (DATA STORE) LARGEST NUMBER (DATA STORE) MID NUMBER (DATA STORE) SMALLEST NUMBER (DATA STORE) 2nd number is largest OUTPUT
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY