How to save HCS12 interrupt state

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

How to save HCS12 interrupt state

ソリューションへジャンプ
1,302件の閲覧回数
AndersJ
Contributor IV

CW for HCS08 provides "intrinsics_hcs12.h".

 

It provides the "__isflag_int_enabled()" function returning TRUE if interrupts are enabled.

This is useful for pushing and popping interrupt status when a disable is needed

and you do not know if you were called by interrupt or not,

and need to restore proper interrupt enable status.

 

Is there a similar possibility in CW for HCS12?

 

Thanks,

Anders J

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
900件の閲覧回数
kef
Specialist I

I'd love intrinsic for carry flag on S12(X). But on S12(X) there're no BMC/BMS instructions like on S08. Such intrinsic function for S12 interrupt flag would generate something like this

 

   PSHA

   TFR   CCR,A

   BITA   #0x10

   PULA

   BEQ / BNE depending on required branch condition

 

 

 

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
901件の閲覧回数
kef
Specialist I

I'd love intrinsic for carry flag on S12(X). But on S12(X) there're no BMC/BMS instructions like on S08. Such intrinsic function for S12 interrupt flag would generate something like this

 

   PSHA

   TFR   CCR,A

   BITA   #0x10

   PULA

   BEQ / BNE depending on required branch condition

 

 

 

0 件の賞賛
返信