sts
opcode. The code executes in 8x+1 cycles, where x is the number of digits. This implementation uses a data stack.printd mov.a *stack, {stack
div.a #10, }stack
mod.a #10, *stack
add.a #48, *stack
add #1, pcount
jmn.a printd, {stack
add.a #1, stack
ploop sts.a }stack, 0
pcount djn ploop, #0