S12X Setting the U bit in the Condition Code Register

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S12X Setting the U bit in the Condition Code Register

1,973 次查看
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
标签 (1)
0 项奖励
回复
2 回复数

839 次查看
Pedro_
Contributor III
Thanks MJW !
0 项奖励
回复

839 次查看
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 项奖励
回复