Here is one that I converted from HJWasm:
It can be used for signed and unsigned qword and can convert to binary, octal, decimal and hex characters
you can call it something like :
mynum = 738h
invoke myqtoa, mynum,ADDR buff, 2, FALSE, FALSE ;binary
invoke myqtoa, mynum,ADDR buff, 8, FALSE, FALSE ;octal
invoke myqtoa, mynum,ADDR buff, 10, FALSE, FALSE ;decimal
invoke myqtoa, mynum,ADDR buff, 16, FALSE, FALSE ;hexadecimal
.data
hextbl db '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'
.code
myqtoa PROC FRAME USES rbx value:qword, buffer:QWORD,radix:DWORD,sign:DWORD,addzero:DWORD
local tmpbuf[34] :BYTE
mov rbx,rdx ;buffer
mov r10,rdx ;buffer
.if (!rcx)
mov rax,rdx
mov byte ptr[rax],'0'
jmp done
.endif
.if (r9b)
mov byte ptr [rdx],'-'
lea r10,[rdx+1]
neg rcx
.endif
lea r9,tmpbuf[33]
mov byte ptr tmpbuf[33],0
lea r11,hextbl
.repeat
xor edx,edx ;clear rdx
mov rax,rcx ;value into rax
dec r9 ;make space for next char
div r8 ;div value with radix (2, 8, 10, 16)
mov rcx,rax ;mod is in rdx, save result back in rcx
movzx eax,byte ptr [rdx+r11] ;put char from hextbl pointed by rdx
mov byte ptr [r9],al ;store char from al to tmpbuf pointed by r9
.until (!rcx) ;repeat if rcx not clear
.if (addzero && al > '9') ;add a leading '0' if first digit is alpha
mov byte ptr[r10],'0'
inc r10
.endif
lea r8,tmpbuf[34] ;end of the buffer in r8
sub r8,r9 ;that will give a count of chars to be copied
invoke memcpy,r10,r9,r8 ;call routine to copy
mov rax,rbx ;return the address of the buffer in rax
done: ret
myqtoa ENDP