Question: ASSEMBLY LANGUAGE - VISUAL STUDIOS (IDE) Write a Program to print the sum of two hex digits. Example: Enter first hex digit: 1 Enter second

ASSEMBLY LANGUAGE - VISUAL STUDIOS (IDE)

Write a Program to print the sum of two hex digits.

Example:

Enter first hex digit: 1

Enter second hex digit: A

Hex sum = B

Use ReadHex to read hex digit from keyboard.

Example: call ReadHex ;Input hexDig1

mov hexDig1, AL

To write a hex digit to the screen we will use author's routine, WriteHex. The routine is written to write a hex number but we will use it to just write a single hex digit.

movzx EAX, hexSum ;Print hexSum

call WriteHex

Use the following Definitions:

.data

hex1Msg BYTE

hex2Msg BYTE

hexSumMsg BYTE "Hex sum = ", 0

hexDig1 BYTE ?

hexDig2 BYTE ?

hexSum BYTE ?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!