answersLogoWhite

0


Best Answer

Assembly language is a symbolic representation of a processor's native code. Using machine code allows the programmer to control precisely what the processor does. It offers a great deal of power to use all of the features of the processor. The resulting program is normally very fast and very compact. In small programs it is also very predictable. Timings, for example, can be calculated very precisely and program flow is easily controlled. It is often used for small, real time applications. However, the programmer needs to have a good understanding of the hardware being used. As programs become larger, assembly language get very cumbersome. Maintenance of assembly language is notoriously difficult, especially if another programmer is brought in to carry out modifications after the code has been written. Assembly langauge also has no support of an operating system, nor does it have any complex instructions. Storing and retrieving data is a simple task with high level languages; assembly needs the whole process to be programmed step by step. Mathmatical processes also have to be performed with binary addition and subtraction when using assembly which can get very complex. Finally, every processor has its own assembly language. Use a new processor and you need to learn a new language each time. Assembly is a great language to use for certain applications, rotten for others and never for the faint hearted.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

The advantages of coding in assembly is far less today than before. High level programming languages are constantly being improved and given features that make assembler less relevant.

Assembler is used primarily in three circumstances.

1) to perform low level operations which can not be done in a high level language. This for example includes the code responsible for the first few instructions needed to start a computer up and load code written in a high level language. In addition, it might be used for making calls between operating modes of the computer's processor where strict adherence to a structure is required.

2) it may be used in areas where there is extreme hardware constraints. For example, a PIC microcontroller might only have a few kilobytes (or even less) of memory to store a program. Therefore, manually choosing each specific processor operation can make the difference between whether code will fit in the CPU or not.

3) finally, and less relevant than ever. Hand coding assembler may in some cases allow faster code to be written than if it were coded in a high level language. In modern times, it is used most heavily to implement "instruction level parallelism" such as making use of SSE, AVX, ARM NEON, etc... instructions. But with the advent of languages like OpenCL which included special types for this specific task, it will become less relevant over time. Popular projects such as the x264 video encoder make heavy use of assembler to squeeze every little extra bit of performance out of the CPU that it can. In many cases, x264s bottleneck now lays in the speed which the CPU can access memory than in the CPU's ability to perform calculations.

On the final point, it's also worth mentioning that with "out of order" execution, the instructions fed to the processor becomes less important since it is not always possible to predict how the code itself will be executed as it once was. This is because different processor cores will perform a step similar to recompiling code differently than each other before executing it.

Therefore, in most cases, only the first two reasons make sense in a modern context. Some might say that any new projects coded with assembler for the sake of performance would likely take longer to write than to wait for a more optimal implementation of a compiler which provides instruction level parallelization to arrive.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

The main advantage: it can directly communicate with hardware. The main disadvantage: it's very hard to write in terms of machine instructions.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the advantage and disadvantage of assembly language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the advantage and disadvantage of language?

Advantage: Language allows us to communicate complex ideas, emotions, and information with others, fostering understanding and connection. Disadvantage: Miscommunication, misunderstandings, and language barriers can lead to conflict or confusion.


What is advantage and disadVantage of agro stone?

advantage ago storm is very cheep and it in weight and as well as very easy to construction and assembly


What is the advantage and disadvantage of body language?

People could get hurt or unwanted outcomes....;)


What are the advantage and disadvantage of fidelio?

What are the advantage and disadvantage of fidelio?"


What are the advantages and disadvantages of basic language?

Basic languages of advantage and disadvantage please give the answer please


What are the advantage and disadvantage of branch libraries?

what are the advantage and disadvantage branch libraries


What are the advantage and disadvantage of sampling techniques?

what are the advantage of and disadvantage of sampling method


What is the advantage and disadvantage of market free?

advantage is its fpree. Disadvantage is that its not fpree.


What is the difference between a disadvantage and an advantage?

Advantage and disadvantage are complete opposites. An advantage is something which is beneficial to an individual. A disadvantage would be not to ones benefit.


What are the advantage and disadvantage of typing?

what are the advantage and disadvantage of typing what is online typing tutorails


Advantage or disadvantage of overhung latrine?

smells bad - disadvantage cheap - advantage


What is the advantage and disadvantage of flashing bios?

i want know to what is advantage and Disadvantage of BIOS