bit.print_dec_uint.div10_step¶

if zero_flag:      // if src is already 0:
break the divide repetitions, and go straight to the printing.
set the char_flag (so that this digit will be printed)
ascii_res[:4] = src[:n] % 10       // (n from print_dec_uint)
src[:n] /= 10

@Uses the label-functions div10 and xor (print_dec_uint implements them), and the return-register ret_reg.
src and ascii_res are both bit[:4], and char_flag, zero_flag and start_printing are flags.

Signature¶

def div10_step div10, xor, ret_reg, src, ascii_res, char_flag, zero_flag, start_printing { ... }

Defined in bit/output.fj — lines 187–194 (view on GitHub).

Complexity¶

  • Time: n(7@+12)

  • Space: 11@-3

See the complexity glossary for what @, w, dw, dbit, n mean.

Depends on¶