section .data
    mensaje db "Resultado: "
    longitud equ $ - mensaje

section .bss
    resultado resb 2

section .text
    global _start

_start:
    ; Mostrar mensaje
    mov rax, 1
    mov rdi, 1
    mov rsi, mensaje
    mov rdx, longitud
    syscall

    ; Sumar 12 + 8
    mov rax, 12
    add rax, 8
    add rax, 1

    ; Dividir el resultado entre 10
    mov rbx, 10
    xor rdx, rdx
    div rbx

    ; Guardar las decenas
    add al, 30h
    mov [resultado], al

    ; Guardar las unidades
    add dl, 30h
    mov [resultado + 1], dl

    ; Mostrar el resultado
    mov rax, 1
    mov rdi, 1
    mov rsi, resultado
    mov rdx, 2
    syscall

    ; Terminar el programa
    mov rax, 60
    mov rdi, 0
    syscall

Embed on website

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