logoalt Hacker News

david-gputoday at 2:07 PM1 replyview on HN

My unsolicited friendly advice to software folks who are curious about assembly languages is: ask yourself what is it that you expect to get out of it.

If you want a better understanding of the architecture, reading the documentation from the hardware vendor will serve you better.

If you want your code to be faster, almost certainly there will be better ways to go about it. C++ is plenty fast in 99% of the situations. So much so that it is what hardware vendors use to write the vast majority of their high-performance libraries.

If you are just curious and are doing it for fun, sure, go ahead and gnaw your way in. Before you do so, why not have a look at how hand-written assembly is used in the rare niches where it can still be found? Chances are that you will find C/C++ with a few assembly intrinsics thrown in more often than long whole chunks of code in plain assembly. Contain that assembly into little functions that you can call from your main code.

For bonus brownie points, here is a piece of trivia: the language is called assembly and the tool that translates it into executable machine code is called the assembler.


Replies

AlotOfReadingtoday at 2:57 PM

    For bonus brownie points, here is a piece of trivia: the language is called assembly and the tool that translates it into executable machine code is called the assembler.
IBM has a long history of using "assembler" as a shorthand away to refer to languages. IBM was dominant enough historically that you'd find it used in all sorts of other places. It's bad terminology, but it's not wrong.