Advantages of assembly language over machine language
Answers
If u like plz mark me brainliest
______
____________;;_;;;;;___
Assembly language is more human-readable than machine language. Generally, statements in assembly language are written using short codes for the instruction and arguments, such as "MOV $12 SP", as opposed to machine language, where everything is written as numbers. Assembly language can have comments and macros as well, to ease programming and understanding.
Generally, programs called "assemblers" transform assembly language to machine language. This is a relatively straightforward process, there being a clear 1-to-1 transformation between assembly and machine language. This is as opposed to compilers, which do a complicated transformation between high-level language and assembly.
/\/\/\/\hope it helps u buddy
Mark me brainliest plz
Advantages of Assembly Language over Machine Language
Assembly languages have following advantages over machine languages:
Easier to understand and use. Due to the use of mnemonics instead of numeric op-codes and symbolic names for data locations instead of numeric addresses, assembly language programs are much easier to understand and use than machine language programs.
2. Easier to locate and correct errors. Due to the use of mnemonic op-codes and symbolic names for data locations and also because programmers need not keep track of storage locations of the data and instructions, fewer errors are made while writing programs in assembly language, and those that are made are easier to find and correct. Additionally, assemblers detect and indicate errors automatically for use of an invalid mnemonic op-code or an undefined name. For example, let us assume that an assembly language program instruction reads ADD AREA and we forget to define AREA in the program. The assembler will look through its table and not finding AREA in it will indicate the error.
3. Easier to modify. Since they are easier to understand, it is easier to locate, correct, and modify instructions of an assembly language program than a machine language program. Moreover, insertion of removal of certain instructions in a program does not require change in the address part of the instructions following that part of the program. This is required in case of machine language.
4. No worry about addresses. An important advantage of assembly language is that programmers need not keep track of storage locations of data and instructions while writing an assembly language program For example, let us assume that we have written a long machine language program involving many instructions and several references to itself within the program such as looping, branching, and so on. At the very end, we discover suddenly that we have left out an instruction in the middle. If we insert that instruction, we will have to go through the entire program to check and modify (if necessary) all references to other instructions. This is certainly a tedious job. However, if we write the same program in assembly language, we merely add the extra instruction, and the assembler will take care of suitably modifying the references automatically.
5. Easily re-locatable. Availability of pseudo-instructions for instructing the system how we want it to assemble a program inside the computer's memory makes assembly language programs easily re- locatable. This is because we can easily change a program's location by changing the pseudo-instructions suitably. This is not possible easily with machine language programming. An example can best illustrate this feature. Let us assume that an assembly language program starts at address 1000, and we find suddenly that this program uses another program, which also starts at location 1000. Obviously, we will have to rewrite one of the two programs to move it to some other location. In machine language, this can be a complicated job. However, in case of assembly language, we merely have to change the pseudo- instructions suitably for assembling the program for one of the two programs. For example, we change the following pseudo-instructions for one of the programs:
START PROGRAM AT 1000
START DATA AT 2000
to the following pseudo-instructions:
START PROGRAM AT 3000
START DATA AT 4000
and run the assembly language program once again through the assembler. The equivalent machine language program will this time start at memory location 3000 instead of 1000, and there will be no conflict with the other program. In other words, we can move assembly language programs easily from one section of memory to another.
6. Efficiency of machine language. An assembly language program also enjoys the efficiency of its corresponding machine language program because there is one-to-one correspondence between the instructions of an assembly language program and its corresponding machine language program. In other words, an assembly language program will be just as long as the resulting machine language program. Hence, leaving out the translation time required by the assembler, the actual execution time for an assembly language program and its equivalent machine language program (written independently) would be the same.