Thank you. The prdecimal procedure is very good for the common case but the printsec procedure is specialized for the task and this makes its code slightly faster and smaller than based on prdecimal.Of course, you can also do:
divide by 100
save remainder
jsr prdecimal
print "."
pop remainder
if <10, print "0"
jsr prdecimal
...which can be more efficient if you've already got a generic divide subroutine or a specific divide-by-10 subroutine in the program.

Statistics: Posted by litwr — Sat Oct 26, 2024 7:13 am