Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a machine-language program to add the three numbers 8, -5 and -2 and output the sum on the output device. Note-the inputs can be

Write a machine-language program to add the three numbers 8, -5 and -2 and output the sum on the output device. Note-the inputs can be hard coded in data storage at the end of your code. The accumulator holds 16 bits so use 16-bit Twos Complement for the -7 and do not use the subtract instruction. Write it in a format suitable for the loader and execute it on the PEP/8 simulator. You may only use instructions in Fig 4.6. (Use the Fig 4.6 revised found with the HW2 assignment) You shall submit:

  1. A written algorithm
  2. Your commented program similar to the Machine Language (hex) of Fig 4.35
  3. The hexadecimal program suitable for the Pep/8 loader. (Cut & paste the text into your document so I can check your code)
  4. A screenshot of your program output screen
  5. Explain the range of numbers that this will work correctly

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions