Error[126] c:\PBP\PBPPIC14.LIB : Argument out of range (2054 not between 0 and 2047)


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Mar 2005
    Location
    CROATIA
    Posts
    38


    Did you find this post helpful? Yes | No

    Default Re: Error[126] c:\PBP\PBPPIC14.LIB : Argument out of range (2054 not between 0 and 2

    I have messing around this macro and line to which points this error126 (560)
    and it shows on
    BRANCH?BCL macro Bin, Cin, Label
    local jmptbl
    MOVE?BA Bin
    movwf R0
    sublw (Cin) - 1
    BIT?GOTO 0, STATUS, C, Label

    branch ?? .... so i was remarked branch line and error126 has disappear
    ok I must use select case-goto instead, but now i tried putting
    dummy 200 lines of
    lcdout "test test test"
    lcdout "test test test"
    lcdout "test test test"
    which increased hex for 3 times, but compiles correctly,
    so obvious there is some bug with branch keyword after code grows.....
    something like jump address can't be bigger then xxxx word....
    but i don't know much about macros and internals, so I'm happy to bound this bug

  2. #2
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Error[126] c:\PBP\PBPPIC14.LIB : Argument out of range (2054 not between 0 and 2

    It's not a bug, it's a feature
    From manual:
    Label must be in the same code page as the BRANCH instruction.
    If you want to go out of page you must use BRANCHL.
    But its twice bigger than BRANCH.

  3. #3
    Join Date
    Mar 2005
    Location
    CROATIA
    Posts
    38


    Did you find this post helpful? Yes | No

    Default Re: Error[126] c:\PBP\PBPPIC14.LIB : Argument out of range (2054 not between 0 and 2

    yes, tried with branchl works like a charm....
    it's really overkill feature, night killer, but ok,
    da nas dvojca moramo do ovamo poteč da riješimo bubu :P
    so, error126 explicitly means that you are using branch out of page ?
    maybe somewhere exist kind of RFM for errors ? this could save time too...

    thank you for help

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