S12X Setting the U bit in the Condition Code Register

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

S12X Setting the U bit in the Condition Code Register

1,760 Views
Pedro_
Contributor III
Hi all,
this is probably an easy question for some of you.
 
How do I set the U bit in the Condition Code Register?
 
I was trying transfering the content to the D accumulator, setting there and back to the CCR, but it doesn't seem to work for the upper byte.
 
Thanks
Pedro
Labels (1)
0 Kudos
Reply
2 Replies

626 Views
Pedro_
Contributor III
Thanks MJW !
0 Kudos
Reply

626 Views
MJW
NXP Employee
NXP Employee
Hello Pedro,

to set the U-bit you can, for example, do this:

Code:
    TFR          CCRH,A    ORAA       #$80    TFR          A,CCRH

 or, without using an extra register:

Code:
    PSHCW
    BSET        0,SP,#$80
    PULCW


HTH,
MJW
 
0 Kudos
Reply