Board logo

标题: CODEWARRIOR中断写法 [打印本页]

作者: pjcucumber    时间: 2008-11-27 10:58     标题: CODEWARRIOR中断写法

方法1

interrupt 3 IntFunc1()
{
…/*code*/
}
Means that the third entry in the vector table is initialized with the address of IntFunc1().
方法2
In the C file:
interrupt IntFunc2()
{
…..
}
In the PRM file:
VECTOR ADRESS 0xFFF2 IntFunc2
Means that the address of IntFunc2 is written at address 0xFFF2.


作者: fayefayehoo    时间: 2008-11-27 15:01

VECTOR ADRESS 0xFFF2 IntFunc2
Means that the address of IntFunc2 is written at address 0xFFF2.

这个错了,0xFFF2是中断向量,存放的是中断程序的入口地址。


作者: strongchen    时间: 2008-12-1 09:51

格式本身没错,但应该是ADDRESS。




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0