大会code VS机code VS对象code? [英] Assembly code vs Machine code vs Object code?

查看:179
本文介绍了大会code VS机code VS对象code?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是对象code,该机code和汇编code之间的区别?

What is the difference between object code, machine code and assembly code?

你能不能给他们差的视觉例子吗?

Can you give a visual example of their difference?

推荐答案

机code是二进制的,可以直接由CPU执行(1和0)code。如果你在一个文本编辑器打开一个机器code的文件,你会看到垃圾,包括不可打印字符(不,不是的的不可打印的字符)。

Machine code is binary (1's and 0's) code that can be executed directly by the cpu. If you were to open a "machine code" file in a text editor you would see garbage, including unprintable characters (no, not those unprintable characters ;).

对象code是一个尚未被链接到一个完整的程序机code的一部分。它的机code为一个特定的库或模块,将弥补完成的产品。它可能还包含在完成的程序,链接器将使用一切连接在一起的机器code未发现占位符或偏移。

Object code is a portion of machine code that hasn't yet been linked into a complete program. It's the machine code for one particular library or module that will make up the completed product. It may also contain placeholders or offsets not found in the machine code of a completed program that the linker will use to connect everything together.

大会code是纯文本(有点)人读能源$ C ​​$ C,有一个直接的大多是1:1的模拟与机器指令。这是使用的实际指令/寄存器/其他资源助记符完成。例子包括像 JMP MULT 的跳跃和乘法指令。不像机器code,CPU不明白大会code。

Assembly code is plain-text and (somewhat) human read-able source code that has a mostly direct 1:1 analog with machine instructions. This is accomplished using mnemonics for the actual instructions/registers/other resources. Examples include things like JMP or MULT for the jump and multiplication instructions. Unlike Machine Code, the CPU does not understand Assembly Code.

这篇关于大会code VS机code VS对象code?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆