Código
.386 .model flat,stdcall option casemap:none include \masm32\include\windows.inc include \masm32\include\kernel32.inc include \masm32\include\msvcrt.inc includelib \masm32\lib\kernel32.lib includelib \masm32\lib\msvcrt.lib includelib \masm32\lib\windows.lib system PROTO C, :PTR BYTE .data hola1 db "por favor digite un numero:",0 hola2 db "por favor digite otro numero:",0 pedir db "%d",0 menu1 db "escoja 1 para sumar 2 resta 3 multiplicar 4 para dividir",0 command BYTE "echo; & pause",0 limpiar BYTE "cls",0 resultado db "%d",0 .data? x dd ? x2 dd ? x3 dd ? menu dd ? .code start: invoke system,ADDR limpiar invoke crt_printf,ADDR hola1 invoke crt_scanf,ADDR pedir,ADDR x invoke crt_printf,ADDR hola2 invoke crt_scanf,ADDR pedir,ADDR x2 mov eax,x mov ebx,x2 invoke crt_printf,ADDR menu1 invoke crt_scanf,ADDR pedir,ADDR menu cmp menu,1 je suma cmp menu,2 je resta cmp menu,3 je multiplicacion cmp menu,4 je division jmp start invoke ExitProcess,0 suma: add eax,ebx invoke crt_printf,ADDR resultado,eax invoke system,ADDR command jmp start resta: SUB eax,ebx invoke crt_printf,ADDR resultado,eax invoke system,ADDR command jmp start multiplicacion: mul ebx invoke crt_printf,ADDR resultado,eax invoke system,ADDR command jmp start division: sub edx,edx div ebx invoke crt_printf,ADDR resultado,eax invoke system,ADDR command jmp start end start