Question: 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:
A. written algorithm
B.Your commented program similar to the Machine Language (hex) of Fig 4.35
C. The hexadecimal program suitable for the Pep/8 loader. (Cut & paste the text into your document so I can check your code)
D. A screenshot of your program output screen
E. Explain the range of numbers that this will work correctly
fig 4.6
fig 4.35

Adress Machine Language (Hex) 500043 Output 'C' 500068 Output 'h' 500072 Output 'r' 500069 Output 'i' 500073 Output 's' 0003 0006 0009 000C 000F 0010 istop end of the program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
