Searching \ for 'CODE re:Look-up table error' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/mems.htm?key=table
Search entire site for: 'CODE re:Look-up table error'.

Truncated match.
PICList Thread
'CODE re:Look-up table error'
1997\05\30@114356 by Wayne Bennett

flavicon
picon face
This is the code that I'm trying to use, its taken straight form the
microchip app. note with little understanding on my part as to what the
table end really is for.

;----------------------------------------------------------------------------
MESSAGE1
       MOVLW   0               ;TABLE ADDRESS OF START OF MESSAGE
dispmsg1
       MOVWF   MSG_TEMP        ; MSG_TEMP HOLDS START OF MESSAGE ADDRESS
       CALL    TABLE1
       ANDLW   0XFF            ; CHECK IF AT END OF MESSAGE
       BTFSC   STATUS,Z        ; (ZERO RETURNED AT END)
       GOTO    out1
       CALL    SEND_CHAR       ; DISPLAY THE CHARACTER
       MOVF    MSG_TEMP,W      ; POINT TO NEXT CHARACTER
       ADDLW   1
       GOTO    dispmsg1
out1
       RETURN


TABLE1
       ADDWF   PCL
       RETLW   '*'
       RETLW   '*'
         .
         .
         .
TABLE_END
       RETLW   0

;----------------------------------------------------------------------------
MESSAGE2
       MOVLW   0               ;TABLE ADDRESS OF START OF MESSAGE
dispmsg2
       MOVWF   MSG_TEMP        ; MSG_TEMP HOLDS START OF MESSAGE ADDRESS
       CALL    TABLE2
       ANDLW   0XFF            ; CHECK IF AT END OF MESSAGE
       BTFSC   STATUS,Z        ; (ZERO RETURNED AT END)
       GOTO    out2
       CALL    SEND_CHAR       ; DISPLAY THE CHARACTER
       MOVF    MSG_TEMP,W      ; POINT TO NEXT CHARACTER
       ADDLW   1
       GOTO    dispmsg2
out2
       RETURN

TABLE2
       ADDWF   PCL
       RETLW   '*'
       RETLW   '*'
         .
         .
         .

TABLE_END
       RETLW   0
;----------------------------------------------------------------------------
;----------------------------------------------------------------------------

The error is stated as:

    "ADDRESS LABEL DUPLICATED OR DIFFERENT IN SECOND PASS (TABLE_END)"

Hope this makes it easier to identify the problem.

Thanks
        _/       _/      _/_/_/_/
       _/       _/      _/     _/
      _/       _/      _/     _/
     _/  _/   _/      _/_/_/_/
    _/ _/ _/ _/      _/      _/
   _/_/   _/_/      _/      _/
  _/       _/  _/  _/_/_/_/

Wayne Bennett
Griffith University
Brisbane Australia
spam_OUTw.bennettTakeThisOuTspamsct.gu.edu.au

1997\05\30@121714 by Michael S. Hagberg

flavicon
face
first the message is because there are two 'TABLE_END' labels.

change them to match the others by adding a '1' or '2' and the error should
go away.

better yet think about this.

you don't have to repeat the code for each table. just load 'w' with the
start of the table you want to print then call a table_print routine.

also, for the code to reconize the end the table_end must return 0xFF.

michael

1997\05\30@182548 by STEENKAMP [M.ING E&E]

flavicon
picon face
The label, TABLE_END is defined twice.  Since a lable is actually an
address, it cannot point to two different addresses.  Make the first
TABLE_END1 and the second TABLE_END2 and the problem should be gone.

Hope it helps!
Niki
.....steenkmpKILLspamspam@spam@firga.sun.ac.za

{Quote hidden}

1997\05\31@014117 by Dmitry Kiryashov

flavicon
face
Wayne Bennett wrote:
{Quote hidden}

I see this code have another error too ! What value you load to PCLATH -
I don't
know . When ADDWF PCL executed PC(HIGH) load from PCLATH (see manual)
and probably
you jump to wrong page without previously correct PCLATH loading .


{Quote hidden}

The same error situation as described above .


{Quote hidden}

This message mean that label was dublicated. Change first label to
TABLE1_END
and second label to TABLE2_END .

WBR Dmitry.

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...