AVR程序必须始终以相对跳转指令开始?
问题描述:
我见过的代码开始,如下面的例子所有AVR程序:AVR程序必须始终以相对跳转指令开始?
.org $0000
rjmp Reset
; ...
Reset:
; Start of program
如果我不利用任何中断,我可以做而不rjmp
和$0000
启动程序的?
答
在位于$ 0000中断向量之后的程序存储器位置。我猜如果你没有使用任何中断,你可以在没有rjmp的情况下启动你的程序。来自ATmega128数据表:
If the program never enables an interrupt source, the interrupt vectors are
not used, and regular program code can be placed at these locations. This is
also the case if the Reset Vector is in the Application section while the
interrupt vectors are in the Boot section or vice versa.