在keil环境下,C文件需要引用一个外部的汇编宏,请教21朋友们怎么样可以做到?
亦或,在C51文件中如何定义一个嵌入的汇编宏?
为方便我贴下码源:
portSAVE_CONTEXT MACRO
/* 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
PUSH B
PUSH DPX
PUSH DPH
PUSH DPL
PUSH PSW
PUSH AR0
PUSH AR1
PUSH AR2
PUSH AR3
PUSH AR4
PUSH AR5
PUSH AR6
PUSH AR7
ENDM |