zyirex1985
Newbie level 3
it about multiplyng two 5-digit numbers and will output 10 digit product using MASM or any other similar assembler.
less than 5 digit inputs shall be handled carefully so that no wrong results will come up.
Machine Problem 2
5-Digit Decimal Multiplication
The program is given two decimal numbers as input. The program should be able to multiply the two numbers and output the product.
Inputs:
The program should allow the user to enter at most 5 decimal digits for both the first and second operands. For simplicity, assume that the user will always enter only the digits 0-9 and will not enter more than 5 digits.
Procedures:
ASCII – BCD Conversion
This procedure converts the input numbers in ASCII code to unpacked decimal numbers
Multiplication
This procedure will multiply the two unpacked decimal numbers. The parameter passing should be as follows:
Address of unpacked operand 1 in SI
Address of unpacked operand 2 in BX
Address of product in DI
BCD – ASCII Conversion
This procedure converts the input numbers in ACII code to unpacked decimal numbers
Output:
The program should output the product (at most 11 decimal digits)
thnx in advance
less than 5 digit inputs shall be handled carefully so that no wrong results will come up.
Machine Problem 2
5-Digit Decimal Multiplication
The program is given two decimal numbers as input. The program should be able to multiply the two numbers and output the product.
Inputs:
The program should allow the user to enter at most 5 decimal digits for both the first and second operands. For simplicity, assume that the user will always enter only the digits 0-9 and will not enter more than 5 digits.
Procedures:
ASCII – BCD Conversion
This procedure converts the input numbers in ASCII code to unpacked decimal numbers
Multiplication
This procedure will multiply the two unpacked decimal numbers. The parameter passing should be as follows:
Address of unpacked operand 1 in SI
Address of unpacked operand 2 in BX
Address of product in DI
BCD – ASCII Conversion
This procedure converts the input numbers in ACII code to unpacked decimal numbers
Output:
The program should output the product (at most 11 decimal digits)
thnx in advance