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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started