Please answer Values 6-10. 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).

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question

Please answer Values 6-10.

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
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education