3/7/2026 at 10:57:38 AM
> Abstractions. They don’t exist in assembler. Memory is read from registers and the stack and written to registers and the stack.[...] But my application-coded debugging brain kept looking at abstractions like they would provide all the answers. I rationally knew that the abstractions wouldn’t help, but my instincts hadn’t gotten the message.
That feels like the wrong takeaway for me. Assembly still runs on abstractions: You're ignoring the CPU microcode, the physical interaction with memory modules, etc. If the CPU communicates with other devices, this has more similarities with network calls and calling the "high level APIs" of those devices. For user space assembly, the entire kernel is abstracted away and system calls are essentially "stdlib functions".
So I think it has a different execution model, something like "everything is addressable byte strings and operates on addressable byte strings". But you can get that execution model occasionally in high-level languages as well, e.g. in file handling or networking code. (Or in entire languages built around it like brainfuck)
So I think assembly is just located a few levels lower in the abstraction pile, but it's still abstractions all the way down...
by xg15
3/7/2026 at 5:52:31 PM
> Assembly still runs on abstractions: You're ignoring the CPU microcode ...Yes and no. There's no way to "get" to these. Arguably assembly is an abstraction on top of codes (hexcodes or binary if you want to see it that way), but the assembly instructions are the lowest level we get to access. For as a programmer you don't get to access the microcodes emulating an amd64 architecture and you cannot decide to use these microcodes directly.
Otherwise it's just electricity. Then it's just electrons.
So it's not false that it's all abstractions but it doesn't help much to view it that way.
by TacticalCoder
3/7/2026 at 10:51:51 PM
> Otherwise it's just electricityThere is a lot going on at the hardware level that is going on and hidden from the view of assembly. Hardware is not magic, there are a ton of design decisions that go into every architecture, most of which isn't immediately obvious by looking at the ISA.
by david-gpu
3/7/2026 at 10:19:48 PM
No, assembly doesn't always inherently deal with abstractions. It depends on the system involved. I don't really count "microcode" as an abstraction, it's essentially part of the hardware and doesn't even exist on many embedded CPUs. The assembly instructions for all intents and purposes operate directly on the hardware. If you wanted to get really absurd with it, you could say that all of it is an abstraction of electrons.Embedded CPU assembly is what I do most often, for the last 40 years, and there aren't really any abstractions at all - not even microcode. You have a few KB or ROM and maybe a few KB of RAM, ALU, registers, peripherals, and that's it - no APIs, no kernel, no system calls, no stdlib. Just the instructions you burn into the ROM.
by leptons
3/7/2026 at 10:49:07 PM
Depending on the ISA, assembly is quite abstracted away from the actual underlying hardware, at least from the viewpoint of a computer architect. It depends on the ISA, of course.Many common hardware features like out of order instruction issuing, register renaming, and even largely caching and segmentation, are largely or entirely hidden at the assembly level.
by david-gpu
3/8/2026 at 1:20:52 AM
Maybe you missed the part where I described that not all CPUs work the same, not all have out of order instruction issuing, register renaming, or even any cache at all. OP was blanket talking about assembly, without realizing the many different kinds of CPUs out there, and apparently you're here cherry-picking too.I have no interest in continuing this pointless internet interaction.
by leptons
3/8/2026 at 12:43:04 PM
Ok.by david-gpu
3/8/2026 at 12:26:49 AM
Thats BS.You can totally convert your assembly into machine code by hand. There is no lower level. Not all cpus have microcode.
by iberator