[英]Easy68k Assembly ORG directive
I know similar questions have been asked, but listen anyway. 我知道有人问过类似的问题,但还是要听。
I've written quite a few Easy68k programs this semester, and I am curious why org directive is always set to $1000, or $2000, or $2500. 这个学期我写了很多Easy68k程序,我很好奇为什么org指令总是设置为$ 1000或$ 2000或$ 2500。
While the answer is "by personal convention", I am more interested in understanding the following: 答案是“根据个人习惯”,但我对理解以下内容更感兴趣:
For instance: 例如:
org $1000
start:
moveq #9, d0
trap #15
end start
works, but is offset by 4096 bytes down 可以,但向下偏移4096字节
start:
moveq #9, d0
trap #15
end start
works also, but is not offset at all 也可以,但是一点也不抵消
So why is this directive needed? 那么为什么需要此指令? I am not reserving [0x0, 0x1000) for any particular purpose, so what is the point of keeping this offset?
我没有为任何特定目的保留[0x0,0x1000),那么保持此偏移量有什么意义呢?
Conclusions so far 到目前为止的结论
I'm really curious. 我真的很好奇
Thanks ahead of time! 提前谢谢!
~Dmitry 〜德米特里
Address 0 through approximately address $800 are reserved for exception vectors in the 68000. $1000 is used as the default starting address to stay clear of the reserved area. 地址6到大约地址$ 800为68000中的异常向量保留。$ 1000用作默认的起始地址,以避开保留区域。 The stack defaults to the top of memory and grows toward address 0.
堆栈默认为内存顶部,并向地址0扩展。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.