So I have been trying to print digits in x64 assembly nasm program and my source code is this:
section .data
digit: db 0, 10
section .text
global _start
_start:
mov rax, 6
mov rbx, 2
div rbx
call _printRAXDigit
mov rax, 60
mov rdi, 0
syscall
_printRAXDigit:
add rax, 48
mov [digit], al
mov rax, 1
mov rdi, 1
mov rsi, digit
mov rdi, 2
syscall
ret
But the output is empty and nothing appears. Is there a problem with my code or assembler
UPDATE:
CherryDT found the answer it was that I typed rdi
instead rdx