comment / Description: The program use a while loop to get three integers Then it sum up the integers and output the sum to the console / TITLE WhileLoopSum (WhileLoopSum.asm) INCLUDE Irvine32.inc ;This is where we declare all the data information .data ;Assign String to getVal getVal BYTE "Enter the integer: ", 0 ;Assign String to output output BYTE "The sum the integers: ", 0 ;Set the sum equal to 0 sum dword 0 ;This is the main procedure of the program .code main PROC ;Create a cmd console call clrscr ;Set the loop counter to 3 mov ecx, 3 comment * Here we create a whileloop that will loop 3 times Inside the while loop we will add up the sum Then we will use the compare method and jz condition It will jump out of the while loop when the counter hits 0 * while0: ;Compare the counter to 0 ;If the counter is 0, jump to end0 cmp ecx, 0 jz end0 ;Get the integer from the user mov edx, OFFSET getVal call writestring call readdec ;Add the user input to the sum ;Store the value back into sum add sum, eax ;Decrement the counter dec ecx ;Jumps back to the beginning of the loop jmp while0 end0: ;Store the sum back into eax mov eax, sum ;Write the sum to the console mov edx, OFFSET output call writestring call writedec ;Skip line call crlf exit main endp END main