; ; divide unsigned integer (hl) by 10 ; remainder appears in (a) with flags set ; a,f,h,l .dten:: push b; save bc lxi b,0f00ah; c=divisor=10; b=iter.cnt=-16 xra a; clear dten1: dad h ral; shift off into (a) cmp c; test jc dten2; no bit sub c; bit=1 inx h dten2: inr b; done? jm dten1; no ora a; set flags for rdr., clear carry pop b; restore ret end