Calculadora, Assembler, Linux
num2:
resb 2
resultado: resb 2 section .text global _start _start: ; Imprimimos enpantalla el mensaje 1 mov eax, 4 mov ebx, 1 mov ecx, msg1 mov edx, lmsg1 int 80h ; Imprimimos en pantalla el mensaje 2 mov eax, 4 mov ebx, 1 mov ecx, msg2 mov edx, lmsg2 int 80h ; Obtenemos el numero 1 moveax, 3 mov ebx, 0 mov ecx, num1 mov edx, 2 int 80h ; Imprimimos en pantalla el mensaje 3 mov eax, 4 mov ebx, 1 mov ecx, msg3 mov edx, lmsg3 2
int 80h ; Obtenemos el numero 2 mov eax, 3 mov ebx, 0mov ecx, num2 mov edx, 2 int 80h ; Imprimimos en pantalla el mensaje 4 mov eax, 4 mov ebx, 1 mov ecx, msg4 mov edx, lmsg4 int 80h ; Imprimimos en pantalla el mensaje 5 mov eax, 4 mov ebx, 1 mov ecx,msg5 mov edx, lmsg5 int 80h ; Imprimimos en pantalla el mensaje 6 mov eax, 4 mov ebx, 1 mov ecx, msg6 mov edx, lmsg6 int 80h ; Imprimimos en pantalla el mensaje 7 mov eax, 4 mov ebx, 1 3
mov ecx,msg7 mov edx, lmsg7 int 80h ; Print on screen the message 8 mov eax, 4 mov ebx, 1 mov ecx, msg8 mov edx, lmsg8 int 80h ; Obtenemos la opcion seleccionada por el usuario mov ebx, 0 mov ecx, opcion movedx, 2 mov eax, 3 int 80h mov ah, [opcion] ; Movemos la opcion seleccionada a el registro AH sub ah, '0' ; Convertimos el valor ingresado de ascii a decimal
; Comparamos el valor ingresado por el...
Regístrate para leer el documento completo.