【发布时间】:2017-03-25 08:57:45
【问题描述】:
LC3 代码的第一行是什么意思? 是指PC的初始值还是指向内存中的位置?
【问题讨论】:
LC3 代码的第一行是什么意思? 是指PC的初始值还是指向内存中的位置?
【问题讨论】:
假设你指的是ORIG,是的,它定义了第一条指令的地址(即后面的所有指令都将从.ORIG中指定的值递增偏移),并且ORIG还设置了@987654323的初始值@(LC,虽然 LC 似乎可以与 PC 互换使用),即这是您的程序将开始执行的地方。
.ORIG
- Tells simulator where to put your code in memory (starting location)
- Only one .ORIG allowed per program module
- PC is set to this address at start up
- Similar to the main() function in C
- Example: the standard convention is
.orig x3000
【讨论】: