是否存在“下面”的编程语言? 集会?

发布于 2024-07-07 17:34:15 字数 21 浏览 7 评论 0 原文

汇编“下面”是否有编程语言?

Is there a programming language "below" Assembly?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(17

长途伴 2024-07-14 17:34:16

机器代码。 是时候程序员用二进制的 1 和 0 进行编码了。 十六进制被认为是对此的进步。 那是在汇编之前,汇编使用代码的名称并将指令的各个部分分成各个部分。

Machine code. Time it was programmers coded in the 1 and 0's of binary. Hex was considered an advance over this. That was before assembly, which uses the code's names and separates the parts of an instruction into its parts.

那片花海 2024-07-14 17:34:16

汇编是机器代码的文本表示。 它有一条语句,代表 CPU 本身内的一条指令。 例如,“MOV X, Y”是一条指令,它通过 CPU 并将值 X 移动到位置 Y。为了获取机器代码,CPU 将有一个代表“MOV”的数字,以及一个代表“MOV”的数字。 “X”(如果它还不是数字)和代表 Y 的数字。这些原始十六进制二进制值是机器代码。 正是这些数字导致 CPU 引导电压/电流通过晶体管,使其执行其操作。

机器代码是较低级别的,但它非常接近汇编。 它是如此接近,以至于没有人愿意使用它,因为它的优点是能够读取指令“MOV”=移动。 变量名也变得可读,而不是堆栈或堆中的原始地址。

Assembly is a text representation of Machine code. It has a single statement which represents a single instruction within the CPU itself. "MOV X, Y" for example, is a single instruction which passes through the CPU and moves a value X into position Y. To get to machine code, the CPU will have a number that represents 'MOV', and a number that represents 'X' (if it's not already a number), and a number that represents Y. These raw HEX binary values are the Machine code. It's the numbers that cause the CPU to direct voltages / currents through the transistors to make it do what it does.

Machine code is a lower level, but it's very very close to assembly. It's so close, that no one bothers using it due to the advantages of being able to read the instruction "MOV" = move. Variable names also become readable rather than raw addresses in the stack or heap.

烟酉 2024-07-14 17:34:16

甚至更低(并不是说“语言”这个词适合“机器”语言或更低的物理层),而是在机器语言下面是用于实际实现每个二进制操作码的许多门和开关的配置所涉及的特定硬件(CPU)... Charles Petzold 写的一本很棒的书涵盖了这个更低的级别,名为“代码"

And to go even lower, (not that the word "language" is appropriate for "machine" language or for even lower physical layers), but below machine language is the configuration of the many gates and switches used to actually implement each binary opcode for the particular hardware (CPU) involved... A great book to read that covers this even lower level is by Charles Petzold, called "CODE"

浮生未歇 2024-07-14 17:34:16

如果下面,你的意思是较低的水平,那么是的。 有机器语言。 汇编在运行之前被转换为机器语言。 在许多现代流程中,机器语言是用微代码模拟的。 有关微码的更多详细信息,请参阅

If by below, you mean lower level, then yes. There is machine language. Assembly is turned into machine language before it is run. On many modern processes the machine language is emulated in microcode. See this for more details on microcode.

橘寄 2024-07-14 17:34:16

我认为你能得到的最低的东西是所谓的物理或TRW(现实世界)。 这就是芯片设计者和制造商用来创建 CPU 和其他处理器的方法,这些处理器可以获取计算机语言的输出并将其转化为有价值的东西。

I think the lowest you can get is something called Physics or TRW (The Real World). This is what chip designers and manufacturers use to create CPUs and other processors that can take the output of computer languages and turn them into something valuable.

醉南桥 2024-07-14 17:34:16

取决于你为什么问。 没有什么是你在汇编中做不到的,而是可以通过其他方法完成的。 机器代码只是完全相同数据的另一种表示形式。

Depends on why you're asking. There's nothing that you can't do in assembly that you can do via some other method. Machine code is just another representation of the exact same data.

清风无影 2024-07-14 17:34:16

第一台计算机(ENIAC)使用硬连线,以便一个计算的输出可以作为另一个计算的输入。 要运行另一个程序,您必须拔掉一些电缆并以不同的方式重新接线。

The very first computers (ENIAC) used hard wiring so that output from one computation could be fed as input to another. To run another program, you had to unplug some cables and re-wire them differently.

奈何桥上唱咆哮 2024-07-14 17:34:16

汇编程序由汇编程序翻译成机器代码。 您可以使用二进制编辑器编写它。 (哎哟!)
CISC 计算机可以具有微代码,用于对芯片的各个部分(ALU、存储器读取等)进行排序。 通常,除了芯片制造商之外,没有人编写微代码。

Assembler is translated into machine code by the assembler. You could write it with a binary editor. (Ouch!)
CISC computers can have microcode, which sequences segments of the chip (ALU, memory fetch, etc). Typically, no one writes microcode, except at the chip manufacturer.

冷月断魂刀 2024-07-14 17:34:16

嗯,正如其他人提到的,有机器语言。 机器语言通常是您在汇编语言中编写的内容的一对一翻译,因此它与汇编代码处于相同的抽象级别 - 只是手工编写要困难得多。

但也有例外,例如 MIPS 汇编语言提供的伪指令

有,或者也许我应该说甚至低于汇编/机器语言:微代码。 就现代逻辑晶体管预算而言,我怀疑微代码正在失去其相关性。

Well, there's machine language, as others have mentioned. Machine language is typically a 1-to-1 translation of what you write in assembly, so it's at the same level of abstraction as assembly code -- just much harder to write by hand.

There are exceptions to this, like the pseudo-instructions provided by the MIPS assembly language.

There is, or maybe I should say was a level below even assembly/machine language: microcode. Modern logic-transistor budgets being what they are, I suspect that microcode is losing its relevance.

陈独秀 2024-07-14 17:34:16

好吧,您始终可以用二进制(或十六进制,或其他某种表示形式)编写代码。 然后你必须在头脑中计算跳跃偏移等。 不建议。 ;)

Well, you can always write code in binary (or hex, or some other representation). You'll then have to calculate jump offsets etc in your head. Not recommended. ;)

烟雨凡馨 2024-07-14 17:34:16

有点。 机器不读取汇编,它们读取“机器语言”,这是汇编被转换成的语言。 机器语言有“操作码”,而不是汇编的助记符,这些操作码通常只是二进制数据。 机器代码通常不被认为是人类可读的。

在 RISC 系统上,机器代码通常是汇编的直接翻译,但特别是在 x86 系统上,两者有很大不同。

Sort of. Machines don't read assembly, they read "machine language", which is what assembly is converted into. Machine language has "opcodes" instead of assembly's mnemonics, and these opcodes are usually just binary data. Machine code isn't usually considered human-readable.

On RISC systems, machine code is often a straightforward translation of assembly, but on x86 systems, in particular, the two are quite different.

美人迟暮 2024-07-14 17:34:16

当然:“机器代码”,维基百科,在关于汇编语言的文章中(http://en .wikipedia.org/wiki/Assembly_language)说:“实现了对特定 CPU 架构进行编程所需的数字机器代码和其他常量的符号表示。”

Sure: "machine code", about which, Wikipedia, in the article on Assembly Language (http://en.wikipedia.org/wiki/Assembly_language), says: "implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture."

远山浅 2024-07-14 17:34:16

甚至在机器代码下面,也可以说是 VHDL——芯片设计。 您甚至不需要设计芯片来执行代码,只需立即将输入转换为输出即可。

(并不是说我是专家 - 我正在使用 C++)

Even below machine code, one could say, is VHDL - chip design. You don't even need to design the chip to execute code, but just instantly transform inputs into outputs.

(not that I'm an expert - I'm using C++)

何其悲哀 2024-07-14 17:34:16

汇编语言是编程语言的底层,因为机器代码不是一种语言,因为它不涉及任何需要遵循的语法规则。 机器代码可能是执行微处理器操作的唯一数据格式:CPU从内存中取出数据,并根据取出的机器代码直接执行指令。

然而,在一些最近的设计中,例如 Intel Pentium 4 及更高版本,机器代码是较低级别 RISC 执行单元操作的表达,称为 uop 或微操作。 因此,这些设计的解码逻辑是将 CISC 类型的指令转换为小微指令,这些微指令通常针对更简单的加载/存储单元,类似于 RISC。 在这方面,我们可以说(尽管这在技术上可能不准确)机器代码描述了体系结构的“更高级别”复杂指令,而不是由CPU的底层执行逻辑以原子方式进行的“真实”操作。

因此,我们有一个架构指令集,或架构机器代码,以及一个对外部世界隐藏的内部级“微指令”集。
Intel 处理器的跟踪缓存被设计为存储此类操作,以优化处理器的超标量性能(因为 CPU 执行微操作而不是可供程序执行的架构指令集)。

Assembly language is the lower floor of the programming language building as machine code is not a language because it does not involve any grammatic rules to follow. Machine code may be the only data format to execute microprocessor operations: the CPU fetches data from memory and executes the instruction directly according to the machine code fetched.

However, in some recent designs, such as the Intel Pentium 4 and up, machine code is the expression of a lower level RISC execution unit operations, known as uops or microoperations. So the decoding logic of those designs is to translate CISC-type instructions into small uops which are generally targeted at a simpler load/store unit, RISC-like. In this aspect, we can say (altough this may not be technically exact) that machine code describes the "higher-level" complex instructions of the architecture, not the "real" operations that are carried atomically by the underlying execution logic of the CPU.

So we've an architectural instruction set, or architectural machine code, and an inner-level "micro-instruction" set which is hidden from the outer world.
The trace cache of the Intel processors was conceived to store such ops to optimize the superscalar performance of the processor (as the CPU executes uops not the architectural instruction-set available for execution by programs).

悲喜皆因你 2024-07-14 17:34:16

您可以将电流发送到 CPU 并告诉它在哪里放置像素。 (几乎是二进制的,但你不使用计算机来编写它。)

You could send electric currents into the CPU and tell it where to place pixels. (Pretty much binary, but you don't use the computer to write it.)

雨巷深深 2024-07-14 17:34:15

实际上,有一层代码位于机器代码之下,称为微代码

Actually there's a level of code that sits below machine code, called Microcode.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文