HiveBrain v1.2.0
Get Started
← Back to all entries
gotchaMinor

Essential difference between Assembly languages to all other programming languages

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
essentialalllanguagesprogrammingdifferenceassemblybetweenother

Problem

I understand that any assembly programming language has so little abstraction, so that one who programms with it (OS creator, hardware driver creator, "hacker" and so on), would have to know the relevant CPU's architecture pattern very well.

For me, this requirement to know the relevant CPU's architecture pattern very well is the essential difference between assembly programming languages to the rest of ("higher") programming languages that don't require that, so we get:

  • nonassembly/high programming languages



  • assembly/low programming languages



  • machine code languages which usually won't be used as programming languages but theoretically can be used as such (and as any other type of computer language for that matter)



Is this the only essential difference, if not, what else there is?

Solution

The two most obvious characteristics of an assembly language are:

  • It is specific to a particular CPU architecture.



  • There is a one-to-one correspondence between assembly language commands and machine code instructions (once you strip out labels, assembler directives and code comments).



By contrast, a high-level language will have the following characteristics:

  • It is portable to some degree i.e. it can be compiled to run on several different target platforms.



  • It provides a layer of abstraction (control structures and data structures) which allows the programmer to ignore the low-level details of the target platform. As a result, there is no longer a simple one-to-one correspondence between language commands and machine code instructions.



However, this is not a black-or-white distinction; there is a grey area where low-level and high-level languages overlap. For example, cross assemblers take assembly language written for one platform and translate it into machine code that can run on a different platform (usually with some restrictions). And there are assemblers (sometimes called "high level" assemblers) that support simple control structures such as IF structures and FOR loops.

Context

StackExchange Computer Science Q#116730, answer score: 9

Revisions (0)

No revisions yet.