Вот как я это сделал.
B_HIGH_BYTE и B_LOW_BYTE - это число, которое вы хотите преобразовать в ASCII, все остальное здесь - только временные переменные
Я разделил вручнуючисло на d'10000 ', d'1000', d'100 ', d'10' и последнее - это то, что осталось:)
, возможно, не самый быстрый способ покупки, чтобы заставить его работать намои потребности.Спасибо за все ваши предложения.
;====================================SPECIAL DIVISION========================
SPECIAL_DIVISION
clrf SPECIAL_DIV_COUNTER
clrf SPECIAL_DIV_HIGH_BYTE
clrf SPECIAL_DIV_LOW_BYTE
clrf SPECIAL_DIV_PREV_ANS_HIGH_BYTE
clrf SPECIAL_DIV_PREV_ANS_LOW_BYTE
movf B_HIGH_BYTE, 0
movwf SPECIAL_DIV_HIGH_BYTE
movf B_LOW_BYTE, 0
movwf SPECIAL_DIV_LOW_BYTE
loop_SD ;getting 5th digit
movf SPECIAL_DIV_HIGH_BYTE,0
movwf SPECIAL_DIV_PREV_ANS_HIGH_BYTE
movf SPECIAL_DIV_LOW_BYTE,0
movwf SPECIAL_DIV_PREV_ANS_LOW_BYTE
movlw 0x10
subwf SPECIAL_DIV_LOW_BYTE,1
btfss STATUS,0
goto $+2
goto $+3
movlw 0x01
subwf SPECIAL_DIV_HIGH_BYTE,1
btfss STATUS,0
goto $+7
movlw 0x27
subwf SPECIAL_DIV_HIGH_BYTE,1
btfss STATUS,0
goto $+3
incf SPECIAL_DIV_COUNTER
goto loop_SD
movf SPECIAL_DIV_COUNTER,0
addlw 0x30
call display_digit
clrf SPECIAL_DIV_COUNTER
movf SPECIAL_DIV_PREV_ANS_HIGH_BYTE,0
movwf SPECIAL_DIV_HIGH_BYTE
movf SPECIAL_DIV_PREV_ANS_LOW_BYTE,0
movwf SPECIAL_DIV_LOW_BYTE
loop_SD2 ;getting 4th digit
movf SPECIAL_DIV_HIGH_BYTE,0
movwf SPECIAL_DIV_PREV_ANS_HIGH_BYTE
movf SPECIAL_DIV_LOW_BYTE,0
movwf SPECIAL_DIV_PREV_ANS_LOW_BYTE
movlw 0xe8
subwf SPECIAL_DIV_LOW_BYTE,1
btfss STATUS,0
goto $+2
goto $+3
movlw 0x01
subwf SPECIAL_DIV_HIGH_BYTE,1
btfss STATUS,0
goto $+7
movlw 0x03
subwf SPECIAL_DIV_HIGH_BYTE,1
btfss STATUS,0
goto $+3
incf SPECIAL_DIV_COUNTER
goto loop_SD2
movf SPECIAL_DIV_COUNTER,0
addlw 0x30
call display_digit
clrf SPECIAL_DIV_COUNTER
movf SPECIAL_DIV_PREV_ANS_HIGH_BYTE,0
movwf SPECIAL_DIV_HIGH_BYTE
movf SPECIAL_DIV_PREV_ANS_LOW_BYTE,0
movwf SPECIAL_DIV_LOW_BYTE
loop_SD3 ;getting 3rd digit
movf SPECIAL_DIV_HIGH_BYTE,0
movwf SPECIAL_DIV_PREV_ANS_HIGH_BYTE
movf SPECIAL_DIV_LOW_BYTE,0
movwf SPECIAL_DIV_PREV_ANS_LOW_BYTE
movlw 0x64
subwf SPECIAL_DIV_LOW_BYTE,1
btfss STATUS,0
goto $+2
goto $+3
movlw 0x01
subwf SPECIAL_DIV_HIGH_BYTE,1
btfss STATUS,0
goto $+3
incf SPECIAL_DIV_COUNTER
goto loop_SD3
movf SPECIAL_DIV_COUNTER,0
addlw 0x30
call display_digit
clrf SPECIAL_DIV_COUNTER
movf SPECIAL_DIV_PREV_ANS_HIGH_BYTE,0
movwf SPECIAL_DIV_HIGH_BYTE
movf SPECIAL_DIV_PREV_ANS_LOW_BYTE,0
movwf SPECIAL_DIV_LOW_BYTE
loop_SD4 ;getting 2nd digit
movf SPECIAL_DIV_HIGH_BYTE,0
movwf SPECIAL_DIV_PREV_ANS_HIGH_BYTE
movf SPECIAL_DIV_LOW_BYTE,0
movwf SPECIAL_DIV_PREV_ANS_LOW_BYTE
movlw 0x0a
subwf SPECIAL_DIV_LOW_BYTE,1
btfss STATUS,0
goto $+2
goto $+3
movlw 0x01
subwf SPECIAL_DIV_HIGH_BYTE,1
btfss STATUS,0
goto $+3
incf SPECIAL_DIV_COUNTER
goto loop_SD4
movf SPECIAL_DIV_COUNTER,0
addlw 0x30
call display_digit
clrf SPECIAL_DIV_COUNTER
movf SPECIAL_DIV_PREV_ANS_HIGH_BYTE,0
movwf SPECIAL_DIV_HIGH_BYTE
movf SPECIAL_DIV_PREV_ANS_LOW_BYTE,0
movwf SPECIAL_DIV_LOW_BYTE
movf SPECIAL_DIV_LOW_BYTE,0 ;getting 1st digit
addlw 0x30
call display_digit
return