微控制器8051:如何获取JB和JB的输入地址CJNE指令?
我正在从头开始用 VHDL 实现整套 8051 指令。大多数事情都很顺利,但偶然发现了这两条说明:
JB bit,rel
00100000 bit_address rel_address
CJNE A,#data,rel
10110100 immediate_data rel_address
非常感谢任何帮助或提示。先感谢您!
I'm implementing whole set of 8051 instructions in VHDL from scratch. Most of things went well but stumbled on these 2 instructions:
JB bit,rel
00100000 bit_address rel_address
CJNE A,#data,rel
10110100 immediate_data rel_address
Any help or hint is greatly appreciated. Thank you in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
相对地址由程序员提供。这通常由汇编器根据标签计算得出。
您的 asm 文件将包含:
汇编器将分析 JB 指令和标签之间的代码,并计算到达标签所需的偏移字节数,这是它提供给 JB 指令的数字。
这里对 8051 指令进行了很好的解释。
The relative address is supplied by the programmer. This is typically computed by the assembler from labels.
Your asm file will contain:
The assembler will analyse the code between the JB instruction and the label and compute the number of bytes of offset needed to get to the label, this is the number it feeds to the JB instruction.
Here is a good explanation of the 8051 instructions.
也许您可以从 http://www.cs.ucr.edu 获得一些提示/~dalton/i8051/i8051syn/ ?
Maybe you could get some hints from http://www.cs.ucr.edu/~dalton/i8051/i8051syn/ ?