汇编代码可以跨平台吗?
0x042444FF; /* inc dword ptr [esp+4] */
0x042444FF
是机器码,而 inc dword ptr [esp+4]
是汇编代码,我知道 机器代码不是跨平台的,因为它取决于许多因素。
汇编代码呢,它取决于CPU吗?
0x042444FF; /* inc dword ptr [esp+4] */
0x042444FF
is the machine code,while inc dword ptr [esp+4]
is the assembly code, I know
machine code is NOT cross-platform,as it depends on many factors.
What about assembly code, does it depends on CPU ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
汇编代码不是跨平台的。
通常,机器指令和汇编指令之间存在非常直接的映射,因此汇编代码取决于体系结构。
来自维基百科:
Assembly code is not cross platform.
Usually there is a very direct mapping between machine instructions and assembly instructions so the assembly code depends on the architecture.
From Wikipedia:
汇编代码基本上是机器代码的一种文字形式;它旨在使编写机器代码更加方便和可读。两者几乎是一对一的映射,因此一条汇编语句被转换为其等效的机器代码。机器代码依赖于 CPU。因此,汇编也依赖于 CPU。
Assembly code is basically a worded form of the machine code; it is designed to make writing machine code a little more convenient and readable. There is pretty much a one-to-one mapping of the two, so one assembly statement is turned into its machine code equivalent. Macine code is CPU-dependent. Assembly is therefore, also CPU-dependent.