What is assembly language ?



What is assembly language
What is assembly language

Assembly Language: - At some time you must have heard about Machine Language / Binary Code, in which 0, 1 was used.
Machine language used to be very difficult because only two digits were used in it, given the problem of 0 and 1.
Computer scientists created the Assembly Language so that any program can be written and understood easily.
Letters, symbols, numbers were used in the Assembly Language. So that any person can understand easily. Assembly language is also like some machine language.

Assembly Language Definition
It is called Assembly Language or Symbolic Language. In the Assembly Language, the Machini Code was used in place of "mnemonic code", which even a common man could easily understand.
Like the language of some assembly language like Tran (Translation), JMP (Jump), LDA (Load) ADD, SUB, there are more such codes.
Those can be easily understood or memorized. In this, a program has already been created in a computer to convert the Assembly Code into Machini Code,

It acts like a translator. Which changes the Machini Code from the Assembly. Just like Google Transter does.


Assembly Langauge Features
1. Mnemonic codes can be easily understood instead of digits.
2. Mistakes in Assembly Language can be easily found and corrected.
3. This programming language takes time. Which makes us easier to make programs?
4. Many features of the machine language are found in this programming language.
5. Assembly Language is a low level language.

Assembly Language Limitations
1. In this programming language, every instruction is given in signs and symbols, and in this the translation of codes is in the machine language. So this language also depends on the hardware. And in this, separate programs have to be written for ALU and Control Unit.
2. If any programmer has to write a program in it, then he should have complete knowledge of hardware. Only then can he write a program in it or else he kept shouting error in it again and again.

Assembly Code Examples
The code you see below is the Programming Code in the Assembly Language of a Calculator.
Assembly Language Program Calculator

       PAGE, 132
       TITLE CALC
CGROUP GROUP CODESEG
CODESEG SEGMENT PARA PUBLIC 'CODE'
       ASSUME CS: CGROUP, DS: CGROUP, ES: CGROUP
       PUBLIC CALC

       ORG 100H

CALC PROC FAR
       JMP START

; ------------------------------------------------- --------------------;
; ;
; DATA AREA;
; ;
; ------------------------------------------------- --------------------;

       DB 'INTERRUPT NUMBER ='
INT_NUMBER DB 61h

SCREEN_HANDLE DW 0001h

MESSAGE DB 'PEMATH is not resident', 13,10
MESSAGE_LEN EQU $ -MESSAGE

TAG DB 'PEMATH'
TAG_LEN EQU $ -TAG

; ------------------------------------------------- --------------------;
; ;
; CODE AREA;
; ;
; ------------------------------------------------- --------------------;

START:
; ------------------------------------------------- --------------------;
; TEST FOR PRESENCE OF CALCULATOR;
; ------------------------------------------------- --------------------;
       SUB AX, AX
       MOV ES, AX
       SUB BH, BH
       MOV BL, INT_NUMBER
       SHL BX, 1
       SHL BX, 1
       MOV DI, ES: [BX]
       MOV ES, ES: [BX + 2]
       ADD DI, 4
       LEA SI, TAG
       MOV CX, TAG_LEN
REPE CMPSB
       JE CALL_CALC
       MOV BX, SCREEN_HANDLE
       MOV CX, MESSAGE_LEN
       LEA DX, MESSAGE
       MOV AH, 40h
       INT 21h
       JMP SHORT CALC_EXIT
; ------------------------------------------------- --------------------;
; CALL CALCULATOR;
; ------------------------------------------------- --------------------;
CALL_CALC:
       MOV AL, INT_NUMBER
       MOV BYTE PTR INT_CODE, AL
       DB 0CDh; INT
INT_CODE:
       DB 00h
       NOP
       NOP

CALC_EXIT:
       INT 20h

CALC ENDP

CODESEG ENDS
       END CALC

You must have found it difficult to understand. If you look carefully then you will understand some part.
If you practice this programming language, then you can understand it even better.

Conclusion -
The assembly language was first displayed in front of people in 1949, it has become a very complete language and its usage is still negligible.
These have now been replaced by High Level Programming Languages such as C, C ++, Python, etc. is.

I wish you would have liked the assembly language today.
So you must give us in the Comment box. Your welcome is always in our blog.

Post a Comment

0 Comments