I'm currently learning assembly and I've created a program that converts 16bit decimal value to binary, but because of the method I've used it's reversed. Output is 00001 instead of 10000. Is there a simple way of reversing the output?
org 100h
section .text
;program
mov ax,60000 ;INPUT NUMBER
mov bx,2
conv:
xor dx,dx
div bx
add dl,48
push ax
mov ah,2
int 21h
pop ax
cmp ax,0
je end
loop conv
end:
mov eax,4c00h
int 21h
section .data