I trying add two large integers numbers, but the ouput show it in ASCII, how can i print a integer value?
Here is the main code:
section .bss
res: resq 8
sum:
mov rax,rdi
add rax,rsi
add rax,'0'
ret
_start: ;tells linker entry point
mov rdi,'100'
mov rsi,'102'
call sum
mov [res],rax
mov rdx,3 ;message length
mov rsi,res ;message to write
mov rdi,1 ;file descriptor (stdout)
mov rax,1 ;system call number (sys_write)
syscall
mov rax,60 ;system call number (sys_exit)
syscall
The ouput: �`