AMX 68000 Target Guide
K
A
DAK
B-7
cjcfflagrd cjcfflagrdcjcfflagwr cjcfflagwr
Purpose Read or Write Processor Status Register
Used by n Task n ISP n Timer Procedure n Restart Procedure n Exit Procedure
Setup Prototype in file
CJZZZTF.H or macro in file
CJZZZCC.H.
#include "CJZZZ.H"
CJ_TYFLAGS CJ_CCPP cjcfflagrd(void);
void CJ_CCPP cjcfflagwr(CJ_TYFLAGS flags);
Description Cjcfflagrd returns the actual state of the processor status register (SR).
Cjcfflagwr updates the processor status register (SR) by writing the
parameter flags to the register.
Use cjcfflagrd to read the state of the processor status register, thereby
capturing the current interrupt state. Then use cjcfdi to briefly disable
all sources of interrupt. Immediately thereafter, use cjcfflagwr to restore
the state of the interrupt system.
Interrupts o Untouched by cjcfflagrd n Restored by cjcfflagwr
Returns Cjcfflagrd returns the actual state of the processor status register.
Cjcfflagwr returns nothing.
Cjcfflagwr unconditionally copies flags into the processor status
register, thereby enabling or disabling interrupts. Since no validation of
flags is performed, caution in the use of cjcfflagwr is advised.
See Also cjcfdi, cjcfei