Ylan Iacobovici

Warning messages concerning "cutting constant" in RS08 code

Discussion created by Ylan Iacobovici on Mar 19, 2007
Latest reply on Mar 22, 2007 by Alban Rampon
In my code for my MC9RS08KA2 A/D conversion I am getting multiple warnings about "cutting constant: Value X is not in range [0..255]." One of these examples is when I use the "mov" instruction in this line of code:
 
mov #(mSOPT_COPE | mSOPT_COPT | mSOPT_STOPE), SOPT
 
The warning is "Warning : A1415: Cutting constant: Value 513 ($0201) is not in range [0..255]."
 
The address location of SOPT is 0201 and I believe that the warning is because the value exceeds what is in the range of 1 byte. The fact that I am accessing an address should make this not matter though. Does anyone know how to deal with this issue? Will this most likely cause my code to not work as I want it to? I would think it would if it doesn't write into the correct memory location since it is cutting off the most significant part of the number. Is there a way to fix this warning? Thanks.
 
Jackabo

Message Edited by J2MEJediMaster on 2007-04-12 10:52 AM

Outcomes