.MODEL SMALL .STACK 100H .DATA MSG DB 'THE SUM OF $' MSG2 DB ' AND $' MSG3 DB ?,'IS $' .CODE MAIN PROC MOV AH,1 INT 21H MOV BL,AL INT 21H INT 21H MOV CL,AL MOV AH,2 MOV DL,0DH INT 21H MOV DL,0AH INT 21H MOV AX,@DATA MOV DS,AX LEA DX,MSG MOV AH,9 INT 21H MOV AH,2 MOV DL,BL INT 21H LEA DX,MSG2 MOV AH,9 INT 21H MOV AH,2 MOV DL,CL INT 21H LEA DX,MSG3 MOV AH,9 INT 21H SUB BL,30H SUB CL,30H ADD BL,CL MOV DL,BL ADD DL,30H MOV AH,2 INT 21H MOV AH,4CH INT 21H MAIN ENDP END MAIN
Sunday, August 12, 2012
Input two integer number not greater than nine and output their sum in Assembly
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment