[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] SREG save?
From: |
Gergely Szentesi |
Subject: |
[avr-gcc-list] SREG save? |
Date: |
Tue, 14 Dec 2004 11:13:12 +0100 |
Hi!
I`m working on a small project with an atmega128 proc.
About the gcc i have a following question:
Should i save the SREG ( system register ) to a register when the program
enters to a signal or interrup routine or after a cli() ( disable global
interrupt )?
SIGNAL(...)
{
char csreg;
csreg = SREG; //is it important or not?
...code....
SREG = csreg;
}
Thanx: )
Szentesi
University of Debrecen Medical and Health Science Center
Faculty of Medicine Department of Biophysics and Cell Biology
P.O.Box 39, Nagyerdei krt. 98
H-4012 Debrecen
Hungary
Phone/Fax: (36) (52) 412-623
mailto:address@hidden