Computer Science Illuminated
7th Edition
ISBN: 9781284155617
Author: Nell Dale, John Lewis
Publisher: Jones & Bartlett Learning
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 6, Problem 45E
Explanation of Solution
Assembly-language
The assembly-language program to read the three input variables “number1”, “number2”, and “number3” and to perform arithmetic operations on those numbers is as follows:
Symbol | Mnemonics | Operand | Comment |
BR | Main | ; Branch to the location Main | |
number1: | .BLOCK | 2 | ; Set up a two byte block for number1 |
number2: | .BLOCK | 2 | ; Set up a two byte block for number2 |
number3: | .BLOCK | 2 | ; Set up a two byte block for number3 |
result: | .BLOCK | 2 | ; Set up a two byte block for result |
Main: | DECI | number1,d | ; Read and store number1 |
DECI | number2,d | ; Read and store number2 | |
DECI | number3,d | ; Read and store number3 | |
LDA | number1,d | ; Load number1 value into the accumulator | |
ADDA | number3,d | ; Add number3 to accumulator and store output into the accumulator | |
SUBA | number2,d | ; Subtract number2 from the accumulator and store output into the accumulator | |
STA | result,d | ; Store accumulator value into result | |
DECO | result,d | ; Write result value on the screen | |
STOP | ; Stop the processing | ||
... |
Expert Solution & Answer
Trending nowThis is a popular solution!
Chapter 6 Solutions
Computer Science Illuminated
Ch. 6 - Prob. 1ECh. 6 - Prob. 2ECh. 6 - Prob. 3ECh. 6 - Prob. 4ECh. 6 - Prob. 5ECh. 6 - Prob. 6ECh. 6 - Prob. 7ECh. 6 - Prob. 8ECh. 6 - Prob. 9ECh. 6 - Prob. 10E
Ch. 6 - Prob. 11ECh. 6 - Prob. 12ECh. 6 - Prob. 13ECh. 6 - Prob. 14ECh. 6 - Prob. 15ECh. 6 - Prob. 16ECh. 6 - Prob. 17ECh. 6 - Prob. 18ECh. 6 - Prob. 19ECh. 6 - Prob. 20ECh. 6 - Prob. 21ECh. 6 - Prob. 22ECh. 6 - Prob. 23ECh. 6 - Prob. 24ECh. 6 - Prob. 25ECh. 6 - Prob. 26ECh. 6 - Prob. 27ECh. 6 - Prob. 28ECh. 6 - Prob. 29ECh. 6 - Prob. 30ECh. 6 - Prob. 31ECh. 6 - Prob. 32ECh. 6 - Prob. 33ECh. 6 - Prob. 34ECh. 6 - Prob. 35ECh. 6 - Prob. 36ECh. 6 - Prob. 37ECh. 6 - Prob. 38ECh. 6 - Prob. 39ECh. 6 - Prob. 40ECh. 6 - Prob. 41ECh. 6 - Prob. 42ECh. 6 - Prob. 44ECh. 6 - Prob. 45ECh. 6 - Prob. 46ECh. 6 - Prob. 47ECh. 6 - Prob. 48ECh. 6 - Prob. 49ECh. 6 - Prob. 50ECh. 6 - Prob. 51ECh. 6 - Prob. 52ECh. 6 - Prob. 53ECh. 6 - Prob. 54ECh. 6 - Prob. 55ECh. 6 - Prob. 56ECh. 6 - Prob. 57ECh. 6 - Prob. 58ECh. 6 - Prob. 59ECh. 6 - Prob. 60ECh. 6 - Prob. 1TQCh. 6 - Prob. 2TQCh. 6 - Prob. 3TQCh. 6 - Prob. 4TQ
Knowledge Booster
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.Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
The Top Down Approach to Software Development; Author: Christopher Kalodikis;https://www.youtube.com/watch?v=v9M8LA2uM48;License: Standard YouTube License, CC-BY