forget misinterpreted last post,
not sure if you saw,
In second post I had added the check for 16 bit =0,at top of routine, few lines asm for that
hard to format text in code window.Code:LIST ARRAYREADTO movf R6, F ; Check for no chars left in array hi & low R6 bcf STATUS, C ; Preset for timed out (C clear) btfsc STATUS, Z ; Set "Z" if LOW "Reg" == 0 movf R6+1, F bz arrayreaddone ; No chars left movf R6, F btfsc STATUS, Z ;decrement high and low decf R6+1, F ;If Low byte is Zero, Decrement High decf R6, F ; Count down the characters left and fall through to ARRAYREAD NOLISTARRAYREAD_USED = 1 endif
Don





Bookmarks