When multiplying 32-bit numbers in assembly, the result will be put in EDX:EAX combination. The upper half of the result goes into EDX and the lower half goes into EAX. If both EDX and EAX have two parts of a result, how can I print these values to the screen using the Irvine32 bit library? See the sample code and comments:
.386
.model flat, stdcall
.stack 4096
ExitProcess proto, dwExitCode:dword
include Irvine32.inc
.data
num1 dword 1000000
num2 dword 1000000
temp dword ?
full_result qword ?
.code
main proc
mov eax, num1
mul num2 ;Result will be put in EDX:EAX (Upper half of number and Lower half of number)
;EDX has the value 232 in decimal. 000000E8 in hex
;EAX has the value 3567587328 in decimal. D4A51000 in hex
;When you put these numbers togather, you get 000000E8D4A51000 in hex.
;When you convert these numbers back to its decimal representation, we get the correct value of 1000000000000
;How to display the result into the screen using Irvine32 library (not 64)
mov temp, eax
mov eax, edx ;Put the upper half of result in eax
call WriteDec ;Write the value in eax
mov eax, temp ;Put the lower half of result in eax
call WriteDec
;This will prints out 2323567587328 instead of 1000000000000
invoke ExitProcess, 0
main endp
end main
Is there a way to convert this number 2323567587328 in a different form so that I can display the upper half and lower half correctly? (packed BCD, etc...)
If it is not possible to format this number in a way so that I can have 1000000000000 in two different registers, please let me know how can I assign this value to the full_result qword type variable.

This
mulinstruction produces an unsigned 64-bit product in EDX:EAX.What follows is a code that converts the unsigned 64-bit number held in EDX:EAX into its decimal representation. A string that you can then output using Irvine's
WriteStringfunction.Conversion of the unsigned 64-bit number held in EDX:EAX
On x86 a cascade of 2 divisions is needed to divide the 64-bit value in EDX:EAX by 10.
The 1st division divides the high dividend (extended with 0) yielding a high quotient. The 2nd division divides the low dividend (extended with the remainder from the 1st division) yielding the low quotient. It's the remainder from the 2nd division that we save on the stack.
To check if the qword in EDX:EAX is zero, I've OR-ed both halves in a scratch register.
Instead of counting the digits, requiring a register, I chose to put a sentinel on the stack. Because this sentinel gets a value (10) that no digit can ever have ([0,9]), it nicely allows to determine when the storage loop has to stop.
Conversion of the signed 64-bit number held in EDX:EAX
The procedure is as follows:
First find out if the signed number is negative by testing the sign bit.
If it is, then negate the number and output a "-" character.
The rest of the snippet is the same as for an unsigned number.
The above code snippets are based on my 16-bit Q/A Displaying numbers with DOS. You could read that too for some additional explanations...
Alternative approach for when you don't care about the string always starting at the same known address
This version is shorter and faster.