yes it is easy
you divide the 10 base number out of 5 or any base you want then take the remainder as the left digit redo with the dividend
like the code below
mov eax, (the wished number)
mov cx, 14
a:
xor edx, edx (or extend the sign by cxd instruction i think)
div word ptr 5
shl edx,12
shld memory, edx, 4
mov edx, eax
loop a:
this is example the result is the memory value clear it before use
mov cx, 14 14 if base 5 it must be changed if not 5