Relative jump to an address within PC - 2K +1 and PC + 2K (words). In the assembler, labels are used instead of relative operands. For AVR microcontrollers with program memory not exceeding 4K words (8K bytes) this instruction can address the entire memory from every address location.AVR(ATmega8515的)RJMP不跳相对
基于http://www.atmel.com/webdoc/avrassembler/avrassembler.wb_RJMP.html,在rjmp
命令应相对改变PC寄存器。但低于我的代码是跳跃的确切地址(在这种情况下,与地址为0x00 ldi temp, low(RAMEND)
命令)
.include "m8515def.inc"
.def temp = r16
STACK_INIT:
; init stack pointer
ldi temp, low(RAMEND)
out SPL, temp
ldi temp, high(RAMEND)
out SPH, temp
TES:
rjmp 0x00
END:
rjmp END
我试图改变rjmp
命令jmp
但ATmega8515的不支持该命令
我不知道这是因为配置什么的。我正在使用AVR Studio 4构建并运行我的程序。有人可以解释一下吗?
这是发生在所有汇编语言还是只是AVR具体? 'rjmp $ + 2'给了我'错误:语法错误,意外$ undefined' –
我无法对所有汇编语言做任何绝对声明。 –