第一个汇编程序:两个数求和时间:2022-09-30 01:09:49Win32下第一个汇编小程序:求两个数的和! 感觉汇编代码比较凌乱,看起来不爽,没有C、Java那样有逻辑,至少目前是这样感觉的! ; 汇编程序:求两个数的和; 作者: Mr.Lee; 日期: 2011年5月16日.386.MODEL FLATExitProcess PROTO NEAR32 stdcall, dwExitCode:DWORDINCLUDE io.h ; header file for input/outputcr EQU 0dh ; carriage return characterLf EQU 0ah ; line feed.STACK 4096 ; reserve 4096-byte stack.DATA ; reserve storage for datanumber1 DWORD ?number2 DWORD ?prompt1 BYTE "Enter first number: ", 0prompt2 BYTE "Enter second number: ", 0string BYTE 40 DUP (?)label1 BYTE cr, Lf, "The sum is "sum BYTE 11 DUP (?) BYTE cr, Lf, 0.CODE ; start of main program code_start: output prompt1 ; prompt for first number input string, 40 ; read ASCII characters atod string ; convert to integer mov number1, eax ; store in memory output prompt2 ; repeat for second number input string, 40 atod string mov number2, eax mov eax, number1 ; first number to EAX add eax, number2 ; add second number dtoa sum, eax ; convert to ASCII characters output label1 ; output label and sum INVOKE ExitProcess, 0 ; exit with return code 0PUBLIC _start ; make entry point publicEND ; end of source code