PDA

View Full Version : Warning (and other Compilation Error) Messages



Melanie
- 14th July 2004, 10:54
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...

igi_sh
- 13th July 2006, 19:13
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?

iw2fvo
- 1st July 2008, 14:22
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





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...

mackrackit
- 1st July 2008, 14:55
There are ways around (sometimes) FP. Can you post you code and maybe you could get some pointers.

Archangel
- 1st July 2008, 18:30
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<br> 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

shirvani
- 8th September 2009, 07:07
hi,Melanie
it was very useful.
thank you

rsocor01
- 9th September 2009, 02:29
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