(no title)
_kst_ | 2 months ago
An assembly language program specifies a sequence of CPU instructions. The mapping between lines of code and generated instructions is one-to-one, or nearly so.
A C program specifies run-time behavior, without regard to what CPU instructions might be used to achieve that.
C is at a lower level than a lot of other languages, but it's not an assembly language.
vnorilo|2 months ago
Both ISA-level assembly and C are targeting an abstract machine model, even if the former is somewhat further removed from hardware reality.
arghwhat|2 months ago
Assembly is not about corresponding to exactly which gates open when in the CPU. It's just the human writable form of whatever the CPU ingests, whereas C is an early take on a language reasonable capable of expressing higher level ideas with less low-level noise.
I seriously doubt anyone who has written projects in assembly would make such comparisons...
cylemons|2 months ago
IshKebab|2 months ago
Nobody claimed that. It corresponds to the instructions the CPU runs and their observable order.
Also it's really only x86 that uses micro-ops (in the way that you mean), and there are still plenty of in-order CPUs.
flohofwoe|2 months ago
It's still much closer to the input machine code compared to what compiler optimizer passes do to your input C code ;)