I am following a basic tutorial from here: https://www.tutorialspoint.com/assembly_programming/assembly_arithmetic_instructions.htm
And the default code from here: https://www.jdoodle.com/compile-assembler-nasm-online
section .text
global _start
_start:
mov eax, [x]
sub eax, '0'
mov ebx, [y]
sub ebx, '0'
add eax, ebx
add eax, '0'
mov [sum], eax
mov ecx, msg
mov edx, len
mov ebx, 1
mov eax, 4
int 0x80
mov ecx, sum
mov edx, 1
mov ebx, 1
mov eax, 4
int 0x80
mov eax, 1
int 0x80
section .data
x db '5'
y db '3'
msg db "sum of x and y is "
len equ $ - msg
segment .bss
sum resb 1
But once the result is over 9 it refuses to print the result or prints some character (like > ;)