Macro file


Closed Thread
Results 1 to 4 of 4

Thread: Macro file

  1. #1
    Mark Esper's Avatar
    Mark Esper Guest

    Default Macro file

    I get Error: Macro SUB?TCL not found in macro file.
    There is no indication of where or what the error is.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi Mark,

    The first thing to do is open up the .LST file with the same name as your program, with Notepad or equiv. Do a search for the error number that's given by the compiler. It should look something like [???], where ??? is a 3 digit number.

    That should give a close idea of where the problem is, but not always.

    Typically, a macro error means that you are trying to do something that is not supported, or using variables that don't work with that command.

    In the case of SUB?TCL, it means that you are trying to subtract a CONstant from a BIT and place the result in a LABEL, which obviously can't happen.

    So, somewhere in your program, look for a subtraction that has a LABEL before the equal sign.

    Labels are what you would GOSUB or GOTO to.

    HTH,
       Darrel

  3. #3
    Mark Esper's Avatar
    Mark Esper Guest


    Did you find this post helpful? Yes | No

    Default Macro error

    Thank you, mr. Taylor for your advice. It inspires me to study parts of the Melabs program that I was not previously aware of.
    The problem turned out to be a typo in writing an IF THEN operation where I had put - where a = was needed. I will be more carefull in the future.
    Mark Esper

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Oh good, you found it. After my post I realized that PBP would have caught the Label before the = sign thing. But I couldn't see any other way to get a SUB?TCL

    If statement with - instead of =, that makes sense.   Good find!

    And, if you really like studying how PBP works, then these 3 files will keep you on the edge of your seat for months.

    .ASM file with the same name as your program.

    PBPPIC14.LIB in the PBP folder.

    PBPPIC14.MAC in the PBP folder.    (The SUB?xxx macro's are in the .MAC file.)
    <br>
    DT

Similar Threads

  1. Replies: 6
    Last Post: - 4th November 2009, 13:36
  2. ERROR: Macro MOD?TCB not found in macro file.
    By JohnP in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th February 2009, 19:10
  3. Error: macro COUNT?TCT nor found in macro file.
    By AMMOTT in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 29th November 2007, 05:05
  4. The ultimate include file
    By bearpawz in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th January 2007, 19:35
  5. Macro CMPEQ?TTT not found in macro file
    By BigWumpus in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 14th May 2006, 00: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