in reply to Re^3: Assembly language
in thread Assembly language
Assembly is not machine code. It doesn't help newcomers to this stuff to blur the distinction. Assembly is a symbolic language that has a very close to 1:1 mapping with machine instructions, though not exactly 1:1. But it provides named constants, named registers, named machine instructions, labels, memory addressing strategies, and a lot more that are not native to machine code. Assembly language is a human readable language, and cannot be run natively on the CPU any more than native machine instructions can be read by a human (without at very least first converting them to an unambiguous printable encoding such as hex -- but even then, good luck with that for anything that isn't super trivial.
Assembly is useful as a teaching aid, or for programming very small systems that don't have C compilers available. It might be useful for hand-optimizing tight sections of C code. But on modern computer hardware, the need for hand-optimizing code at the Assembly level is quickly vanishing.
I enjoyed learning 6502 Assembly. On the one hand it was a big pain. But on the other, it was fascinating. But even in the 80s, it was just about the slowest way to get anything done. I think that if someone wants to learn assembly, they should do it. They'll gain an appreciation for the fundamentals. But nobody's going to write a REST microservice in it. ;)
To the OP: The days of being able to just input raw machine instructions for the CPU to execute ended with computers with switchboard face panels like the Altair 8800. And even then, it was hard enough that people would mostly just key in a short bootloader, and use it to pull down the actual program, written in a less tedious way. Nowadays, when you're typing at the Linux command line you are typing within a piece of software (the shell), and it doesn't expose the CPU directly, at least not easily. The shell doesn't understand 011101011101000101001010100001010111110101010000000101010101011011010110101.
Dave
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Assembly language
by LanX (Saint) on Dec 16, 2019 at 17:30 UTC |