section	.data
msg	db	"Bienvenido al programa",0xa, 0xD
len	equ	$ - msg
msg2 db  "", 0xa, 0xD
len1 equ $-msg2
msg3 db "Fin del programa (Sigo en segundas)", 0xa, 0xD
len2 equ $-msg3

msg4 db "La suma de 9+8 es:", 0xa, 0xD
len3 equ $-msg4
msg5 db "La multiplicacion de 5*3 es: ", 0xa, 0xD
len4 equ $-msg5
msg6 db "La resta de 9-8 es: ", 0xa, 0xD
len5 equ $-msg6
msg7 db "La division de 8/2 es: ", 0xa, 0xD
len6 equ $-msg6

section .bss
resultado resb 1
resultado2 resb 1

section	.text
	global _start
_start:
	
	mov	eax, 4
	mov	ebx, 1
	mov	ecx, msg
	mov	edx, len
	int 0x80
	
	;SUMA 9+8
	mov	eax, 4
	mov	ebx, 1
	mov	ecx, msg4
	mov	edx, len3
	int 0x80
	
	mov eax, 9
	mov ebx, 8
	add eax, ebx
	add eax, '0'
	mov [resultado], eax
	
	mov eax,4
	mov ebx,1
	mov ecx, resultado
	mov edx,1
	int 0x80
	
	mov	eax, 4
	mov	ebx, 1
	mov	ecx, msg2
	mov	edx, len1
	int 0x80
	
	;MUL 5*3
	mov	eax, 4
	mov	ebx, 1
	mov	ecx, msg5
	mov	edx, len4
	int 0x80
	
	mov eax, 5
	mov ebx, 3
	mul ebx
	add eax, '0'
	mov [resultado], eax
	
	mov eax,4
	mov ebx,1
	mov ecx, resultado
	mov edx,1
	int 0x80
	
	mov	eax, 4
	mov	ebx, 1
	mov	ecx, msg2
	mov	edx, len1
	int 0x80
	
	;RES 9-8
	mov	eax, 4
	mov	ebx, 1
	mov	ecx, msg6
	mov	edx, len5
	int 0x80
	
	mov eax, 9
	mov ebx, 8
	sub eax, ebx
	add eax, '0'
	mov [resultado], eax
	
	mov eax,4
	mov ebx,1
	mov ecx, resultado
	mov edx,1
	int 0x80
	
	mov	eax, 4
	mov	ebx, 1
	mov	ecx, msg2
	mov	edx, len1
	int 0x80
	
	;DIV 8/2
	mov	eax, 4
	mov	ebx, 1
	mov	ecx, msg7
	mov	edx, len6
	int 0x80
	
    mov eax, 8
    mov ebx, 2
    xor edx, edx
    idiv ebx
    add eax, '0'
    mov [resultado2], eax
    mov byte[resultado2+1], 0xA
    
    mov eax, 4
    mov ebx, 1
    mov ecx, resultado2
    mov edx, 1
    int 0x80
	
	
	mov	eax, 4
	mov	ebx, 1
	mov	ecx, msg2
	mov	edx, len1
	int 0x80
	
	mov	eax, 4
	mov	ebx, 1
	mov	ecx, msg3
	mov	edx, len2
	int 0x80
	
	mov	eax, 1	    
	int	0x80        

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: