Hi,
So the ERROR_OUT variable gets assigned different values depending on if you compile with PBP or PBPL, even though all the input values are equal?
Can you share some typical values for DATA_OUT[4] to DATA_OUT[9] when it fails so we can try/verify? Or does it always fail, no matter what the values are?
Also, the variables in the code you're actually showing, are they BYTEs or WORDs?

When you compile with PBPL all the internal system and temp variables are 32bit variables and some operations are treated as LONGs even though the end result is "going into" a byte or word sized variable. Depending on what's happening with the value "along the way" so to speak it's possible that you'll end up with the "wrong" result. I don't know enough about the internals to say if your code might "suffer" from that but I guess it's possible.

If the program doesn't use any LONGs why are you compiling with PBPL to start with? You'll save a bunch of FLASH, RAM and cycles from not doing that (once you figure out how to make it work of course).

/Henrik.