User input In Assembly using Irvine 32/64
TITLE MASM Template (main.asm) ; Description: ; Revision date: INCLUDE Irvine32.inc .data myMessage1 BYTE "Enter the first number: ",0dh,0ah,0 myMessage1 BYTE "Enter the second number: ",0dh,0ah,0 inputNum1 DWORD ? inputNum2 DWORD ? .code main PROC call Clrscr mov edx,offset myMessage1 call WriteString call ReadInt ;Reads the integer value from console and moves it to eax. mov inputNum1,eax ;Input value is taken in eax. mov edx,offset myMessage2 call WriteString call ReadInt ;Reads the integer value from console and moves it to eax. exit main ENDP END main