S12X Setting the U bit in the Condition Code Register

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S12X Setting the U bit in the Condition Code Register

1,978件の閲覧回数
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 返答(返信)

844件の閲覧回数
Pedro_
Contributor III
Thanks MJW !
0 件の賞賛
返信

844件の閲覧回数
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 件の賞賛
返信