MC9S08PA4 warning

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

MC9S08PA4 warning

Jump to solution
497 Views
mikee_
Contributor I

Hello,

 

I am getting this strange warning every time I compile my code.

 

In my code I start by Initialization section when I configure the PORT registers as follows.

 

BCLR    0,PORT_PTAOE  

; Output disabled

 

BSET    0,PORT_PTAIE   ; Input Enabled

 

I am using Freescale Codewarrioe 10.6 and the compilor does not seem to like something about my code. I get the following warning for each line in my code where I try to configure a register.

 

The warning is the following: A13003 Value is truncated to one byte.

 

Any help?

 

Many thanks

 

M.

Labels (1)
Tags (1)
0 Kudos
1 Solution
401 Views
tonyp
Senior Contributor II

Check the values for the PORT_PTAOE and PORT_PTAIE symbols.

If they are not in zero page (i.e., have an MSB of zero) then you cannot use the BSET/BCLR instructions.  You will have to use a LDA/ORA/STA (BSET) or LDA/AND/STA (BCLR, using inverted mask) sequence instead.

View solution in original post

0 Kudos
2 Replies
402 Views
tonyp
Senior Contributor II

Check the values for the PORT_PTAOE and PORT_PTAIE symbols.

If they are not in zero page (i.e., have an MSB of zero) then you cannot use the BSET/BCLR instructions.  You will have to use a LDA/ORA/STA (BSET) or LDA/AND/STA (BCLR, using inverted mask) sequence instead.

0 Kudos
401 Views
mikee_
Contributor I

Thank you so much.

you were right !!

0 Kudos