CPUs fundamentally know only binary. The assembler, compiler or disassembler only provide convenience utilities to assist inputting or outputting the data in higher levels of abstraction (such as grouping to hex-digits or decimals, signed or unsigned, floating points and instructions such as cmp ax, 10
).
Both cmp ax, 10
and some variety of cmp ax, 0x0a
or cmp ax, $a
or cmp ax, 000ah
all encode to the same instruction: xx 0a
.
Your task indeed is using instructions knowing only "numbers" split a 16-bit number (e.g. 8EFF) to it's components (array of length 1..5) and output it using ASCII conversion.
When implementing the reduction of powers algorithm, notice that the 8086 DIV instructions use the register pair DX:AX as the input.