Warning (and other Compilation Error) Messages


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2003
    Posts
    2,358

    Default Warning (and other Compilation Error) Messages

    Compiler Warning Messages such as...

    '...[102] code crosses boundary @ 800h "

    are there to tell you (as if you really wanted to know) that your program code has exceeded one Page Boundary (at 2k) and has moved into another.

    There will another message at 1000h (4k), and another at 1800h (6k) and again at 2000h (8k). When you write big programs you'll end up with quite a collection of them.

    Whats the meaning of this warning?

    There are a number of Assembler instructions that only work correctly within a Page Boundary, this is just a reminder to you (as the programmer) that this has happened.

    And what must I do?

    Nothing. It's just a reminder. PIC Basic handles everything for you with two exceptions...

    1. Use of the PIC Basic BRANCH Command.

    If you have used this command, consider using it's bigger brother BRANCHL. See the PIC Basic manual for the salient differences.

    2. You've got embedded ASSEMBLER within your Basic Code.

    Then this reminder is for you to check whether incrementing across a Page Boundary will affect usage of Page Select Registers PA0 & PA1 or PCLATH. If you are performing forward jumps, your code may not land where you expect it to.

    Where can I find more information about these messages?

    In your installation directory of your MeLabs compiler, you will find a file called PM.TXT. Open it up and have a look. This is the manual for the PM Assembler. All the messages, Warnings and Errors are listed inside by number.

    Hands-up everybody that's seen Error 300? That's the excuse you've got for keeping an 'emergency' crate of Beer in the fridge...

  2. #2
    igi_sh's Avatar
    igi_sh Guest


    Did you find this post helpful? Yes | No

    Angry question

    Melanie,
    as I see , when using standard version of PicBasic any basic command is replaced with a call to a subroutine that is in PBL wich in Page0 and no peration made to PCLATH register. So If I get to page1 using brachl and try perform POKE (wich in page0) it will not work. gosub and goto not working actually no basic command will not work when called from page1. Is there a way around this problem?

  3. #3
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default PM vs mpasm with Melabs fp

    Good day,
    I am using picbasic pro with microcode studio. I use Melabs FP too.
    The the pic16f877 gives me a lot of errors when compiling with the Mpasm.
    Could you please inform about the following:
    ( of course I did follow all the instruction available at Melabs site ).
    * Where Do I have to extract the Melabs FP routines for use with both PM and Mpasm ?
    * Is there something should I do with the existing .INC files (PM and Mpasm ) ?
    * If the basic program has the FP piece included in a subroutines then the PIC will not work after programming even if no error is displayed after compiling. If the FP is simply included (copy) when needed in the program without including it in a subroutine then the pic works. But if this inclusion is made more than three time the pic does not work. Could you give some directions? Are there some restriction that I am not taking into account ?
    Thanks in advance for the help.
    Ambrogio
    IW2FVO




    Quote Originally Posted by Melanie View Post
    Compiler Warning Messages such as...

    '...[102] code crosses boundary @ 800h "

    are there to tell you (as if you really wanted to know) that your program code has exceeded one Page Boundary (at 2k) and has moved into another.

    There will another message at 1000h (4k), and another at 1800h (6k) and again at 2000h (8k). When you write big programs you'll end up with quite a collection of them.

    Whats the meaning of this warning?

    There are a number of Assembler instructions that only work correctly within a Page Boundary, this is just a reminder to you (as the programmer) that this has happened.

    And what must I do?

    Nothing. It's just a reminder. PIC Basic handles everything for you with two exceptions...

    1. Use of the PIC Basic BRANCH Command.

    If you have used this command, consider using it's bigger brother BRANCHL. See the PIC Basic manual for the salient differences.

    2. You've got embedded ASSEMBLER within your Basic Code.

    Then this reminder is for you to check whether incrementing across a Page Boundary will affect usage of Page Select Registers PA0 & PA1 or PCLATH. If you are performing forward jumps, your code may not land where you expect it to.

    Where can I find more information about these messages?

    In your installation directory of your MeLabs compiler, you will find a file called PM.TXT. Open it up and have a look. This is the manual for the PM Assembler. All the messages, Warnings and Errors are listed inside by number.

    Hands-up everybody that's seen Error 300? That's the excuse you've got for keeping an 'emergency' crate of Beer in the fridge...

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    There are ways around (sometimes) FP. Can you post you code and maybe you could get some pointers.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hello iw2fvo,
    If I understand the question . . .
    I believe it will work this way: Put the FP routines in the same directory as the code you are working on, and in your code put
    INCLUDE "MY FP ROUTINES.BAS", MY FP Routines being whatever is the actual name of the FP file you intend to include, same as using MODEDEFS.BAS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  6. #6
    shirvani's Avatar
    shirvani Guest


    Did you find this post helpful? Yes | No

    Default

    hi,Melanie
    it was very useful.
    thank you

  7. #7
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    657


    Did you find this post helpful? Yes | No

    Default

    Yes, I agree with shirvani. This threat is very helpful. The first time I saw this warning message ''...[102] code crosses boundary @ 800h ", it freak me out, but thanks to this threat I understood what was going on. Thank you Melanie.

    Robert

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