Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Codewarrior Embedded > HCS08 global in...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 399 of 415
Post > Topic >>

HCS08 global interrupt flag context save/restore

by "Ether Jones" <EtherJones@[EMAIL PROTECTED] > Dec 15, 2006 at 05:32 PM

Does anyone know how to "push flags" on the HCS08 series
microcontrollers?

I have a section of code that I need to make non-interruptable.  But I
can't simply do this:

DisableInterrupts
<non-interruptable code here>
EnableInterrupts

.... because I don't know whether or not interrupts were disabled in the
first place, and if they were disabled, I don't want to enable them.  I
want to leave things the way I found them.

In the Intel world, I'd just do this:

PUSHF  (push flags)
DisableInterrupts
<non-interruptable code here>
POPF  (pop flags, restoring whatever state existed before I disabled
interrupts)

I read all the docs I could find, but never saw this issue addressed.
It says that the "CCR" register contains the global interrupt flag, but
there's no assembly instruction to read it or push it unto the stack.

Does anyone have a solution for this?
 




 3 Posts in Topic:
HCS08 global interrupt flag context save/restore
"Ether Jones" &  2006-12-15 17:32:28 
Re: HCS08 global interrupt flag context save/restore
"Stephen Pickering&q  2006-12-19 09:50:58 
Re: HCS08 global interrupt flag context save/restore
"Ether Jones" &  2006-12-19 12:28:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 22:58:30 CDT 2008.