我见过的所有示例 AVR 程序都以如下代码开头:
.org $0000
rjmp Reset
; ...
Reset:
; Start of program
如果我不使用任何中断,我可以在没有rjmp
and 的情况下启动程序$0000
吗?
位于 $0000 中断向量之后的程序存储器位置。我想如果你不使用任何中断,你可以在没有 rjmp 的情况下启动你的程序。来自 ATmega 128 数据表:
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.