PDA

View Full Version : Where to read the explanation for warning code?



Alberto
- 21st July 2016, 11:52
I have got the following asm warning while compiling:
"ASM WARNING Argument out of range. Least significant bits used. (0) : Warninig [202]"

Where can I find the decoding text for "warning [202] ?

I did check the PBP3 manual with no luck. Is there any link to melab site to see what the warning means?

Thank you for the attention.

Alberto

Dave
- 21st July 2016, 13:21
The easy way to find out what is going on is to look at the .LST file in the same directory as the .BAS file. Open this .LST file and search for the word "WARNING". You should see somewhere in the area the variable that is being manipulated. This warning is often given if someone is trying to manipulate data as if it is a WORD, but indead the variable is a BYTE.

HenrikOlsson
- 21st July 2016, 14:35
Since the warning comes from the assembler and not the compiler the correct place to look for what it means would be the assembler manual (http://ww1.microchip.com/downloads/en/DeviceDoc/33014L.pdf). With that said it usually doesn't give much more details than the warning or error message itself which is Argument out of range. Least significant bits used.

See if Daves advice leads you to it, if not you're going to have to reduce the code until you find the offending piece or post the whole thing and perhaps someone is able to find the issue.

/Henrik.

Alberto
- 21st July 2016, 15:50
Thank you Dave and Henrik for the kind answer. As suggested by Dave I have opened the .LST file and found that the warning was due to a variable set as a byte while it should be a word. Once changed the size of the variable and re-compiled the program, the WARNING disappeared!

So thank you for solving my warning problem, but many thanks for the new things I have learned today!

Alberto

Dave
- 22nd July 2016, 15:25
Glad to help, You know, some of this stuff just isn't in the manual....