GCC(AVR)汇编:减去标签地址
我正在尝试完成:
LABEL:
....
subi r18, LABEL
我需要从寄存器中减去标签的地址。我该怎么做?
I am trying to accomplish:
LABEL:
....
subi r18, LABEL
I need to subtract address of a label from a register. How do I do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如 avrfreaks 上的回答:
http://www.avrfreaks.net/index .php?name=PNphpBB2&file=viewtopic&p=857982#857982
参考文档:
http://sourceware.org/binutils/docs-2.21/as/AVR_002dModifiers .html#AVR_002d修饰符
as answered on avrfreaks:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=857982#857982
reference document:
http://sourceware.org/binutils/docs-2.21/as/AVR_002dModifiers.html#AVR_002dModifiers
注意:我对 AVR 汇编器不太熟悉,这只是我通过阅读一些网页可以得出的结论。我还假设您的地址是 16 位的。
Note: I'm not that familiar with AVR assembler, this is just what I could gauge from reading a few webpages. I'm also assuming that your addresses are 16-bit.