Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Two’s complement (4 points) (4 pts) Write a program in assembly language to add the two numbers (-102 and -87). Inputs should be in decimal format. Store the result as hexadecimal numbers at address...

1 answer below »

Two’s complement (4 points)
(4 pts) Write a program in assembly language to add the two numbers (-102 and -87). Inputs should be in decimal format. Store the result as hexadecimal numbers at address $6000. Print out the result in command output window in decimal format. (Hint: use the trap function task #3). If an e
or (overflow) happens, you should also print out the e
or (overflow) message as well.
You are not allowed to hardcode the two input numbers!
You should design your program to accept any two numbers as inputs!
You may ignore sanity check on corner cases, but assume user inputs are always in an expected format.
You may need to design your program to convert ASCII characters into integer numbers! Think about how to convert string "-102" into integer -102 in JAVA or C++!
Copy and paste the screen shot of the output(command) window into your submission file. Do not submit an individual file for the image!
Copy and paste the screen shot of your memory system at address $6000 into your submission file. Do not submit an individual file for the image!
Submit the source file (.X68) and the listing file(.L68) individually. Do not attach the code into your submission file! For simplicity, name your source file as HW2.X68 and your listing file as HW2.L68.

Answered 63 days After May 02, 2022

Solution

Aditi answered on Jul 05 2022
89 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here