top of page
Writer's picture_Romeyo Boy_

Assembly Language

Updated: Feb 24, 2022


Writing a program in machine language is a very difficult, tedious and boring job for a programmer. To solve this problem and for the convenience of the programmer, easily understandable languages ​​have been developed. Assembly language is one of them. Programs can easily be written in alphanumeric symbols instead of 0s and 1s. For this purpose, meaningful and easily rememberable symbols are selected.

Assembly Language - Creative Bloke

For example, ADD for addition, SUB for subtraction, CMP for comparison, etc. Such symbols are known as mnemonics. Programs written in mnemonics are called assembly language programs. It is easier and faster to write programs in assembly language than to write programs in machine language.

Assembly Language Characteristics

  • Due to the use of mnemonic codes and appropriate names for the data, this programming language is more easily understood.

  • This programming language takes less time.

  • In this, mistakes can be easily discovered and removed.

  • This programming language includes many features of machine language.


Assembly Language Limitations

  • Since each instruction in this programming language is given in symbols and symbols and is directly translated into machine language, this language also depends on the hardware. Different programs have to be written for different ALU and controlling unit.

  • To write a program the programmer should have complete knowledge of the hardware.


Example Of Program In Assembly Language



Assembly Language - Second Example:

Address

Label

Instruction (AT&T syntax)

Object code

.begin

.org 2048

a_start

​.equ 3000

2048

​ld length,%

2064

​be done

00000010 10000000 00000000 00000110

2068

​addcc %r1,-4,%r1

10000010 10000000 01111111 11111100

2072

​addcc %r1,%r2,%r4

10001000 10000000 01000000 00000010

​2076

​ld %r4,%r5

11001010 00000001 00000000 00000000

2080

​ba loop

​00010000 10111111 11111111 11111011

2084

​addcc %r3,%r5,%r3

10000110 10000000 11000000 00000101

2088

done:

​jmpl %r15+4,%r0

10000001 11000011 11100000 00000100

2092

length:

​20

00000000 00000000 00000000 00010100

2096

address:

​a_start

00000000 00000000 00001011 10111000

.org a_start

3000

a:

Advantages Of Assembly Language

Assembly language has the following advantages over machine language -

Advantages Of Assembly Language - Creative Bloke
  • It allows complex tasks to be carried out in a simple manner.

  • It is memory efficient, as it requires less memory.

  • It is fast in speed, as its execution time is short.

  • It is mainly hardware oriented.

  • It requires less instruction to get the result.

  • It is used for important tasks.

  • It is a low-level embedded system.

  • It is very complex and difficult to understand.

  • The size or memory of the computer is required to run a long program written in an assembly language.

  • Assembly language is easier to understand and use because mnemonics are used instead of numerical op-codes and appropriate names are used for the data.

  • Errors are easy to detect and fix because of the use of mnemonics and symbolic field names. Furthermore, assemblers are so designed that they automatically catch errors.

  • Assembly language programs are easier for people to modify than machine language programs because they are easier to understand so it is easier to locate, correct and modify instructions as and when they want.

  • One of the advantages of assembly language is that it eliminates the concern of addressing for instructions and data.

  • Assembly language programs are easily readable, as their location is easily changed by simply changing the first instruction.


Disadvantages Of Assembly Language

The following disadvantages of machine language could not be overcome even after the use of assembly language.

Disadvantages Of Assembly Language - Creative Bloke
  • Assembly languages ​​are machine dependent, because each instruction in a symbolic or symbolic language is translated into exactly one machine language instruction.

  • Since assembly language is machine dependent, the programmer must be aware and aware of the hardware and requirements of a particular machine as the program is written and required.

  • In the case of assembly language, instructions are still written at the machine code level, i.e. substituting an assembler instruction for a machine code instruction.

  • The syntax of assembly language is very difficult to understand.

  • The syntax is difficult to remember.

  • It is not necessary to keep track of memory locations.

  • It takes a lot of time and effort to write code for this.

  • It lacks portability of programs between different computer architectures.

  • Assembly language is complex, it is not that easy to understand.

  • Assembly language is not portable, assembly language is also different for different computers.

  • The computer needs more memory to run long programs in assembly language.




✨ Also Know Some Related Articles


11 views0 comments

Recent Posts

See All

Kommentare


bottom of page