Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions

Question

=+2 Why are so many countries bothered by their brain drains?

Answered: 1 week ago