在SDCC中是如下定义的:
/*
* Macro to push the current execution context onto the stack, before the stack
* is moved to XRAM.
*/
#define portSAVE_CONTEXT() \
{ \
_asm \
/* Push ACC first, as when restoring the context it must be restored \
last (it is used to set the IE register). */ \
push ACC \
/* Store the IE register then disable interrupts. */ \
push IE \
clr _EA \
push DPL \
push DPH \
push b \
push ar2 \
push ar3 \
push ar4 \
push ar5 \
push ar6 \
push ar7 \
push ar0 \
push ar1 \
push PSW \
_endasm; \
PSW = 0; \
_asm \
push _bp \
_endasm; \
}
/*-----------------------------------------------------------*/
在keil中我把_asm 替换为#pragma asm 会提示#出错。
|