Question: Write a program called p 2 . asm that is similar to program 1 but, instead of adding the numbers, the program multiplies the number

Write a program called p2.asm that is similar to program 1 but, instead of adding the numbers, the program multiplies the number using IMUL. Use the form of IMUL that takes one argument. You should first zero out AX. Then, you will load the first number (after converting it to a number, of course) into al, and call IMUL with an operand that references the memory containing the second number, for example:
imul [second_number]
The answer will be stored in AX, but you only have to worry about printing what is in AL (you can assume that the results are a single digit number for printing purposes, just like in problem 1).
Example output:
The Multiplying Program
Please enter a single digit number: 2
Please enter a single digit number: 3
The answer is: 6

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