Assembly compatibility and architectures

Asked

Viewed 293 times

4

I have no experience with low-level Assembly language.

What is required to obtain the maximum of cross Platform with that language?

I mean, if I just focus on AMD64 (x86-64) I’ll get compatibility with all current computers?

  • 1

    Thank you, but I don’t understand where I’m prompting opinion. I don’t understand of Assembly.I’d just like to know your cross Platform capability.

  • @Segio I don’t understand Assembly, but he’s just asking about compatibility even. No need to close the question.

  • 1

    @Andrey and Weslley, okay. I withdrew the vote to close.

  • Sorry for my inexperience in the stack,.

  • Yes, it’s improved and I’m responding.

1 answer

6


Each processor architecture has its own assembly language, so it has been since the beginning of modern computers in the 1940s. The only way to better explore an architecture is to create a way to use it in a very specific way. Assembly is not cross Platform by definition. If necessary, use C.

Well, actually every architecture has a different machine code, which makes Assembly different. It is possible to have different syntaxes for the same architecture.

There are currently hundreds or even thousands of architectures in use. Of course, no one learns them all. The most common is to learn only one or two, maybe three.

Learning several languages Assembly is not difficult. Difficult is to be very good at several. And there is not much space in the market for those who are not very good. Remember that today almost no more assembly is used in any task.

And even if you focus on an architecture you may need to learn different syntax from Assembly. There are assemblers that prefer a different syntax to do the same thing. For x86 there is a Intel syntax and AT&T syntax. But syntax is the least of the worries.

The most commonly used architectures today are wildly x86_64 (majority of desktops) and the ARM (majority of mobiles). In a way the second has already surpassed the first.

All other architectures together do not come close to these two. But some may be more important to Assembly. Embedded device architectures, which are not often used, still use Assembly as the main language. This has changed a lot. More and more C or C++ is used even in these cases but Assembly is common.

The Assembly language has an absolute link with the processor and nothing else. Operating systems do not affect Assembly itself. Of course you may have to deal with specifics of them but for other reasons and not by language. Example:

  • If you’re not wearing one Assembler (doubt) will have to know the OS executable file format.
  • Accessing the API (processes, files, GUI, etc.) of the operating system is always made specific to it but does not belong to the language.

Note that if you are not writing a backend of a compiler, knowing only the Assembly is the tip of the iceberg. Even in this case, Assembly is only a part of the necessary knowledge.

Learning Assembly is very useful to understand the functioning of the computer, to have a hobby but today its practical use has greatly reduced. It is rarely even used to produce operating systems or drivers. Outside compilers/Jitters (even so, not all kinds), bootstrap and some architecture that has no other language, Assembly is absolutely unnecessary.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.