gpt4 book ai didi

assembly - AVR 程序必须始终以相对跳转指令开头吗?

转载 作者:行者123 更新时间:2023-12-02 19:21:15 26 4
gpt4 key购买 nike

我见过的所有示例 AVR 程序都以如下代码开头:

.org $0000
rjmp Reset
; ...
Reset:
; Start of program

如果我不使用任何中断,我可以不使用 rjmp 并在 $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.

关于assembly - AVR 程序必须始终以相对跳转指令开头吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/956851/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com