.def fASCIIL =r16 .def tASCII0 =r16 .def fASCIIH =r17 .def tASCII2 =r25 .def tASCII3 =r19 .def tASCII4 =r20 .def tASCII1 =r21 .def cnt16a =r21 .def tmp16a =r22 .def tmp16b =r23 ;***** Код print_ascii: check1 r20 check1 r19 check1 r25 check1 r21 check1 r16 ret bin2ASCII15: ldi tmp16a, low(10000) ldi tmp16b, high(10000) rcall bin2ASCII_digit mov tASCII4, cnt16a ldi tmp16a, low(1000) ldi tmp16b, high(1000) rcall bin2ASCII_digit mov tASCII3, cnt16a ldi tmp16a, low(100) ldi tmp16b, high(100) rcall bin2ASCII_digit mov tASCII2, cnt16a ldi tmp16a, low(10) ldi tmp16b, high(10) rcall bin2ASCII_digit ldi r17,0x30 add r16,r17 add r21,r17 add r25,r17 add r19,r17 add r20,r17 rcall print_ascii ret bin2ASCII_digit: ldi cnt16a, -1 bin2ASCII_digit_loop: inc cnt16a sub fASCIIL, tmp16a sbc fASCIIH, tmp16b brsh bin2ASCII_digit_loop add fASCIIL, tmp16a adc fASCIIH, tmp16b ret