Is there a Macro to return I bit value in status register?

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

Is there a Macro to return I bit value in status register?

ソリューションへジャンプ
1,398件の閲覧回数
PG1
Contributor I

Is there a macro to return the status of the I (global int enable) bit in the status register?

 

Or do you have to roll your own assembly language function?

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,196件の閲覧回数
bigmac
Specialist III

Hello,

 

For 8-bit MCUs there is the function __isflag_int_enabled() that returns the status if the I-bit.  The prototype is within "intrinsics_HC08.h".  There are also similar functions for returning the status of the carry flag, the half carry flag, and the external interrupt pin.

 

Regards,

Mac

 

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,197件の閲覧回数
bigmac
Specialist III

Hello,

 

For 8-bit MCUs there is the function __isflag_int_enabled() that returns the status if the I-bit.  The prototype is within "intrinsics_HC08.h".  There are also similar functions for returning the status of the carry flag, the half carry flag, and the external interrupt pin.

 

Regards,

Mac

 

0 件の賞賛
返信
1,196件の閲覧回数
PG1
Contributor I

Thanks. I will do a search for it in the HCS08 version of codewarrior, or see if I can port it over.

0 件の賞賛
返信
1,196件の閲覧回数
CrasyCat
Specialist III

Hello

 

Function __isflag_int_enabled() is an intrinsic function of the HC08, HCS08 and RS08 compiler.

If you are targeting another MCU it might not be available.

 

By the way which MCU are you targeting?

 

CrasyCat

0 件の賞賛
返信