section .data
    msg db "Card 1: 4", 10, "Card 2: 5", 10, "Hand Total: "
    answer db "0", 10
    len equ $ - msg

section .text
    global _start

_start:
    mov al, 4           ; First card
    add al, 5           ; Add second card
    add al, '0'         ; Convert number to text
    mov [answer], al    ; Save the total

    mov rax, 1          ; Print result
    mov rdi, 1
    mov rsi, msg
    mov rdx, len
    syscall

    mov rax, 60         ; End program
    xor rdi, rdi
    syscall

Embed on website

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