Question: 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!

ASSEMBLY LANGUAGE Answer should be in ASSEMBLY LANGUAGE CODE ONLY! Enter first

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 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!