Answered step by step
Verified Expert Solution
Question
1 Approved Answer
ASSEMBLY LANGUAGE Answer should be in ASSEMBLY LANGUAGE CODE ONLY! Enter first digit: 1 Enter second digit: 2 Sum = 3 Discussion: To read a
ASSEMBLY LANGUAGE
Answer should be in ASSEMBLY LANGUAGE CODE ONLY!
Enter first digit: 1 Enter second digit: 2 Sum = 3 Discussion: To read a digit from the keyboard we will use the author's routine, ReadDec. This routine is written to read in a number but we will use it to just read in a single digit. call ReadDec mov dig1, AL To write a digit to the screen we will use the author's routine, Write Dec. This routine is written to write a number but we will use it to just write a single digit. movzx EAX, digSum;Print digSum call WriteDec Solve the problem with pseudocode first. You can think of this problem as printing the sum of two numbers but the numbers are a single digit. Use the following definitions .data dig1Msg BYTE "Enter first digit: ", 0 dig2Msg BYTE "Enter second digit: ", 0 sumMsg BYTE "Sum = ", 0 dsig1 BYTE ? dig2 BYTE? digSum BYTEStep 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