CW 6.1 Assembler S08QE128: Warning A13003: Value truncated to one byte

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CW 6.1 Assembler S08QE128: Warning A13003: Value truncated to one byte

2,132 Views
Tbspd_TOK
Contributor III
I have this funny warning suddenly appearing after several error free makes.
 
The variables is defined in a 'page0_ram section short'. The fault is only appearing for the references in the same file, in a rom section.
 
The same variables is used in another file where they are XDEFB'd and assemble without any problems.
 
The two variables is named 'timer_tick' and 'timer_count', and the problem started when I made the 'timer_count' variable. Before that the exact same 'timer_tick' instruction assembled without fault.
 
My question is then, is there any known naming convention problems in CW, and how many characters in a name is included/used? I'm used to 32 valid characters, but this could be shorter here?
 
How stable is CW 6.1?
Labels (1)
Tags (1)
0 Kudos
3 Replies

504 Views
bigmac
Specialist III
Hello,

One possible cause of the warning might be if one or more of the variables reside in other than zero page RAM.  Some instructions apply only to zero page, and there would be a problem if used for memory locations elsewhere, or if the RAM page is unclear to the assembler.

If the variables are defined and XDEFed in another file, in the current file have you listed the variables using the XREFB directive?

Regards,
Mac

504 Views
Tbspd_TOK
Contributor III
The problem occur when the the variable is defined in a page0 ram section in the same file where it is used in a code (rom) section.
And yes, I know the reason is that there is a page0 type mismatch for this variable. But the same variable is used in another file without problems (but then XREFB'd). This should indicate that the variable is registered as a page0 type. I used 'SHORT' for the ram section, and I wonder if this could be the reason?
 
I don't have time for testing the theories now, maybe next week.
 
I've solved my current problem just by moving the ram sections to a separate file, and XREFB the variables in all the files I use them.
 
It looks like there is a bug in CW regarding this, since the warning appeared after I increased the number of variables I used in the file. As I said everything was ok until I added a new variable, and then I got a warning on both variables.
 
TOK
0 Kudos

504 Views
bigmac
Specialist III
Hello TOK,

Is the RAM section positioned in the file prior to the code section in which the variable is referenced?

Regards,
Mac

0 Kudos