Error [113]


Closed Thread
Results 1 to 7 of 7

Thread: Error [113]

  1. #1
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    82

    Default Error [113]

    Hi,

    I cannot understand the reason for an Error [113] message.
    I am using a PIC18F2685 with PBPL.


    DataTP CON EXT ; Tables P
    DataTC CON EXT ; Tables C
    DataTB CON EXT ; Tables B

    DataTS VAR LONG BANK0

    ...

    DataTP ;
    #include "KPPV3.ASM"
    EndTP

    DataTC ;
    #include "KPCV3.ASM"
    EndTC

    DataTB ;
    #include "KPBV3.ASM"
    EndTB

    ...

    DataTS = DataTC

    ...

    movlw LOW DataTS ; Computing DataTS+AdTS
    addwf _AdTS,W ; and storing to Ads(AdsU:AdsH:AdsL)
    movwf _ADSL
    movlw HIGH DataTS
    addwfc _AdTS+1,W
    movwf _ADSH
    movlw UPPER DataTS
    addwfc _ZERO,W
    movwf _ADSU


    I use three external tables.
    I want to select one table and make some operations with it

    I think that the declarations are correct but three Error [113] message are generated, one per line of the asm section where DataTS is used. These errors are related to DataTS which is seen as not being declared.

    If I replace DataTS by DataTC (for example) in the asm section, no errors occur.

    What's wrong ?

    Thank you for your help

    MikeBZH
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Error [113]

    ASM
    ...assembler code
    ENDASM

    Look up proper syntax in manual.

    Robert

    Edit: EndTP, is that a new command in PBP3?
    Last edited by Demon; - 25th April 2013 at 12:48.

  3. #3
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    82


    Did you find this post helpful? Yes | No

    Default Re: Error [113]

    I found the solution.

    Writing :

    movlw LOW DataTS

    is a non-sense since DataTS is a variable, not a constant
    and movlw stands for "move litteral to w"

    other mov instructions are certainly more appropriate. I need to search.

    Demon, all this syntax comes from Darrel examples. It works !

    MikeBZH

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Error [113]

    I don't doubt it works, but are you compiling in PVP or ASM?

  5. #5
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    82


    Did you find this post helpful? Yes | No

    Default Re: Error [113]

    Hi Demon

    I assume you mean PBP, not PVP.
    The code is written in PBP with some sections in ASM.

    You're right. The block :

    DataTP ;
    #include "KPPV3.ASM"
    EndTP

    DataTC ;
    #include "KPCV3.ASM"
    EndTC

    DataTB ;
    #include "KPBV3.ASM"
    EndTB

    is inside an ASM / ENDASM section

    MikeBZH

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Error [113]

    PBP, Darn small keypad on cell phone.

  7. #7
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    82


    Did you find this post helpful? Yes | No

    Default Re: Error [113]

    To complete this topic and for anybody interested by the solution :

    DataTS is first splitted into three bytes :

    DataTSL = DataTS.BYTE0
    DataTSH = DataTS.BYTE1
    DataTSU = DataTS.BYTE2

    then the program is the same as before but movlw are replaced by movf

    movf _DataTSL,W
    addwf _AdTS,W
    movwf _ADSL
    movf _DataTSH,W
    addwfc _AdTS+1,W
    movwf _ADSH
    movf _DataTSU,W
    addwfc _ZERO,W
    movwf _ADSU

    No more error. It works.

    MikeBZH

Similar Threads

  1. PBP, 16F1827, FSR, and Error 113
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 13th January 2014, 09:04
  2. Replies: 1
    Last Post: - 30th March 2012, 04:13
  3. error 113 _FCMEN_OFF_1H
    By keymuu in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th November 2008, 17:12
  4. Error code [112]/[113]
    By Dj tempo in forum General
    Replies: 3
    Last Post: - 17th June 2007, 16:15
  5. Error 113
    By b1arrk5 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 4th November 2006, 21:36

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts