Answer the question
In order to leave comments, you need to log in
Marketing moves around assembly language?
Why do books on high-level languages accuse assembly language of being unportable? After all, experienced programmers fit into the 8086 instruction set. Like C programs, Assembler programs need to be recompiled for each new platform. Is not it so? Why then are assembler programs not portable? Explain, please, intelligibly.
Answer the question
In order to leave comments, you need to log in
After all, experienced programmers fit into the 8086 instruction setNo. For 30 years, no one has been trying to meet 8086. On the contrary, if they undertake to write in assembler, then often with the aim of using some iron-dependent things.
Like C programs, assembler programs need to be recompiled for each new platform. Is not it so?What do you mean by "new platform"?
You can immediately see a person who has neither read Tanenbaum, nor even opened Wikipedia. Assembler is not a language, it is a translator of instructions into machine code. Assemblers exactly the same number of hardware architectures. Instructions for one processor will not be in another processor and they are not interchangeable. This is the lowest level where there are no abstractions (I'm exaggerating a little, but in relation to other languages this is true)
Because the C program can be simply rebuilt.
And rewrite the program in assembler.
Why then are assembler programs not portable?
If it is intelligible, then this is the difference between a high-level language and a low-level one;
High-level -> Compiler to low-level language on a given architecture -> executable code
Low-level language on a given architecture -> executable code
It is easy to see that Assembler (aka Low-level language on a given architecture) already includes a given architecture, and therefore cannot be ported to another architecture;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question