Al says he got the note from the PICLIST. I don't recall it... Robert Rolf wrote: > redtock8@dxtron wrote: > >> My table starts at h1000 and crosses a couple >> of pages. It is a table of words to send to > > > Couple? There's the problem. You only pass in an > 8 bit 'offset' so you can't possibly compute a > valid start address for any 'msg' past the first 255 bytes. > > You need to compute a two byte offset, and add BOTH > bytes to PC to fetch the desired message bytes. > > Robert > >> a display. My problem is when the text crosses >> a page. I could use an example if any one has one. > > >> Thanks >> Al > > redtock8@dxtron wrote: > >> I'm trying to display text entries from a large >> table and am having a problem. My table crosses pages >> so I am trying some code from PICLIST.COM. >> works but always goes 8 address beyond >> where the char is. >> Thanks for any help >> Al >> >> DISPLAY_TABLE >> movwf offset ;save the >> table index >> call msg ;go >> get char >> movwf txsend ;move it >> to tx char buffer >> andlw 0xFF ; >> btfsc status,0x2 ;is it >> zero ? >> goto done ;yes-return >> call tx2display ;no-send >> to display >> movf offset,w ; >> addlw 0x1 ;inc offset >> goto DISPLAY_TABLE ;GET NEXT CHAR 0xF4 >> DONE: >> return >> ;return to calling routine >> (got this code below from PICLIST.COM) >> MSG >> movlw high(table_start) >> movwf pclath >> movf offset,w >> addlw table_start >> btfsc ststus,c ; >> incf pclath >> movwf pcl >> >> TABLE_START >> retlw............... >> last entry is retlw 0 > -- Note: Attachments must be sent to attach@engineer.cotse.net, and MAY delay replies to this message. 520-219-2363 -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist