; ; The code will prompt to input a number; sum up it ; and output the sum; 0 or negative to quit ; TITLE CMP2.asm INCLUDE Irvine32.inc .data msg byte "Input an integer: ", 0 msg1 byte "Your input is: ", 0 .code main PROC MOV EBX, 0 ; clear EBX LL: mov EDX, offset msg ; primpt a message call WriteString call ReadInt ; n -> EAX ;mov EDX, offset msg1 ;call writestring ;call WriteInt ;call crlf ;call crlf cmp eax, 0 JE LQ JL LL ADD EBX, EAX ; EBX holds the sum JMP LL LQ: MOV EAX, EBX ;call dumpregs call WriteInt ; p.114, 124 call crlf exit main ENDP END main