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

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

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

Jump to solution
684 Views
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?

Labels (1)
Tags (1)
0 Kudos
1 Solution
482 Views
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

 

View solution in original post

0 Kudos
3 Replies
483 Views
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 Kudos
482 Views
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 Kudos
482 Views
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 Kudos